Advertisement
k-joseph

Untitled

Jun 12th, 2014
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. <changeSet id="CSM-58-01062014" author="k-joseph">
  2. <preConditions onFail="MARK_RAN">
  3. <not><tableExists tableName="chartsearch_categories"/></not>
  4. </preConditions>
  5. <comment>
  6. Create the chartsearch_categories table
  7. </comment>
  8. <createTable tableName="chartsearch_categories">
  9. <column name="category_id" type="int" autoIncrement="true">
  10. <constraints primaryKey="true" nullable="false" />
  11. </column>
  12. <column name="name" type="varchar(50)">
  13. <constraints nullable="false" />
  14. </column>
  15. <column name="description" type="varchar(255)" defaultValue="null" />
  16. <column name="uuid" type="char(38)">
  17. <constraints nullable="false" />
  18. </column>
  19. </createTable>
  20. </changeSet>
  21.  
  22.  
  23.  
  24. <changeSet id="CSM-58-120620141638" author="k-joseph">
  25. <preConditions onFail="MARK_RAN">
  26. <not><tableExists tableName="chartsearch_sub_categories"/></not>
  27. </preConditions>
  28. <comment>
  29. Create the chartsearch_sub_categories table
  30. </comment>
  31. <createTable tableName="chartsearch_sub_categories">
  32. <column name="sub_category_id" type="int" autoIncrement="true">
  33. <constraints primaryKey="true" nullable="false" />
  34. </column>
  35. <column name="category_id" type="int">
  36. <constraints nullable="false" />
  37. </column>
  38. <column name="name" type="varchar(125)">
  39. <constraints nullable="false" />
  40. </column>
  41. <column name="description" type="varchar(255)" defaultValue="null" />
  42. <column name="uuid" type="char(38)">
  43. <constraints nullable="false" />
  44. </column>
  45. </createTable>
  46. <addForeignKeyConstraint constraintName="category_sub_category_fk"
  47. baseTableName="chartsearch_sub_categories" baseColumnNames="category_id"
  48. referencedTableName="chartsearch_categories" referencedColumnNames="category_id"/>
  49. </changeSet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement