Guest User

Untitled

a guest
Apr 19th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. /*
  2. Table definition as it is now
  3. */
  4. create table xar_block_group_instances (
  5. id int(11) not null auto_increment primary key,
  6. group_id int(11) not null default '0' key,
  7. instance_id int(11) not null default '0' key,
  8. template varchar(100) default '',
  9. position int(11) not null default '0',
  10. )
  11.  
  12. /*
  13. Table definition with all the refactoring applied manually
  14.  
  15. @todo:
  16. - this table should be called blockgroup_members
  17. */
  18. create table block_group_instances (
  19. id int(11) unsigned not null auto_increment primary key,
  20. group_id int(11) unsigned not null
  21. comment 'block group, prevent deletion while it has members'
  22. references block_groups(id) on delete restrict,
  23. instance_id int(11) unsigned not null
  24. comment 'block instance, when removed, remove it from the block groups it is in too'
  25. references block_instances(id) on delete cascade, /* if a block is removed, remove it from it's block group too */
  26. template varchar(100) default ''
  27. comment 'template used by this block inside the group',
  28. position int(11) unsigned not null default '0'
  29. commebnt 'position of block within the group',
  30. ) comment 'instances of blocks, within blockgroups'
Add Comment
Please, Sign In to add comment