Forums | Mahara Community
Support
/
instance column in the blocktype_wall_post table
03 August 2009, 13:58
Can anyone tell me how the instance column (in the blocktype_wall_post db table) is populated whenever someone makes a new wall post? Where is this number coming from? Some users have different numbers for multiple posts while other users have the same instance number for multiple posts.?.03 August 2009, 15:58
Solved....... maybe.....
The instance column in blocktype_wall_post is the id of the records in the block_instance table.
I was going to do a custom update to the blocktype_wall_post table but I really don't won't to use my custom ways of doing so (meaning I wouldn't use Mahara's way of updating this db table). I made this post to figure out if anybody has some ideas/solutions for using the Wall blocktype on any page I choose.
03 August 2009, 17:59
demo-mahara-org=# \d blocktype_wall_post
Table "public.blocktype_wall_post"
Column | Type | Modifiers
----------+-----------------------------+------------------------------------------------------------------
id | bigint | not null default nextval('blocktype_wall_post_id_seq'::regclass)
instance | bigint | not null
from | bigint | not null
replyto | bigint |
private | smallint | not null default 0
postdate | timestamp without time zone | not null
text | text | not null
Indexes:
"blocwallpost_id_pk" PRIMARY KEY, btree (id)
"blocwallpost_fro_ix" btree ("from")
"blocwallpost_ins_ix" btree (instance)
"blocwallpost_rep_ix" btree (replyto)
Foreign-key constraints:
"blocwallpost_fro_fk" FOREIGN KEY ("from") REFERENCES usr(id)
"blocwallpost_ins_fk" FOREIGN KEY (instance) REFERENCES block_instance(id)
"blocwallpost_rep_fk" FOREIGN KEY (replyto) REFERENCES blocktype_wall_post(id)
That might help? instance foreign keys to block_instance(id)