Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Table definition as it is now
- */
- create table xar_block_group_instances (
- id int(11) not null auto_increment primary key,
- group_id int(11) not null default '0' key,
- instance_id int(11) not null default '0' key,
- template varchar(100) default '',
- position int(11) not null default '0',
- )
- /*
- Table definition with all the refactoring applied manually
- @todo:
- - this table should be called blockgroup_members
- */
- create table block_group_instances (
- id int(11) unsigned not null auto_increment primary key,
- group_id int(11) unsigned not null
- comment 'block group, prevent deletion while it has members'
- references block_groups(id) on delete restrict,
- instance_id int(11) unsigned not null
- comment 'block instance, when removed, remove it from the block groups it is in too'
- references block_instances(id) on delete cascade, /* if a block is removed, remove it from it's block group too */
- template varchar(100) default ''
- comment 'template used by this block inside the group',
- position int(11) unsigned not null default '0'
- commebnt 'position of block within the group',
- ) comment 'instances of blocks, within blockgroups'
Add Comment
Please, Sign In to add comment