[pal-cvs 2782] [528] updated tables related to language table

svnno****@sourc***** svnno****@sourc*****
2007年 9月 3日 (月) 23:30:41 JST


Revision: 528
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=528
Author:   shinsuke
Date:     2007-09-03 23:30:41 +0900 (Mon, 03 Sep 2007)

Log Message:
-----------
updated tables related to language table

Modified Paths:
--------------
    pompei/portlets/pompei-core/trunk/src/main/config/pompei.clay
    pompei/portlets/pompei-core/trunk/src/main/webapp/WEB-INF/db/create_table.sql


-------------- next part --------------
Modified: pompei/portlets/pompei-core/trunk/src/main/config/pompei.clay
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/config/pompei.clay	2007-09-03 07:48:37 UTC (rev 527)
+++ pompei/portlets/pompei-core/trunk/src/main/config/pompei.clay	2007-09-03 14:30:41 UTC (rev 528)
@@ -353,7 +353,7 @@
 </table>
 <table alias="" name="CATEGORIES" remarks="">
 <table-description></table-description>
-<table-figure-bounds height="-1" width="-1" x="703" y="2795"/>
+<table-figure-bounds height="-1" width="-1" x="730" y="2829"/>
 <column-list>
 <column alias="" auto-increment="true" column-size="10" decimal-digits="0" default-value="AUTOINCREMENT: start 1 increment 1" mandatory="true" name="CATEGORIES_ID" remarks="">
 <column-description></column-description>
@@ -367,7 +367,7 @@
 <variant precision-max="4000" precision-min="1" precision-variable="%n" type-name-pattern="VARCHAR(%n)"/>
 </data-type>
 </column>
-<column alias="" auto-increment="false" column-size="10" decimal-digits="0" default-value="0" mandatory="true" name="PARENT_ID" remarks="">
+<column alias="" auto-increment="false" column-size="0" decimal-digits="0" default-value="0" mandatory="false" name="PARENT_ID" remarks="">
 <column-description></column-description>
 <data-type jdbc-type="4" name="INTEGER" selected-variant-pattern="INTEGER">
 <variant type-name-pattern="INTEGER"/>
@@ -403,7 +403,15 @@
 <primary-key-column name="CATEGORIES_ID"/>
 </primary-key>
 <unique-key-list/>
-<foreign-key-list/>
+<foreign-key-list>
+<foreign-key alias="" name="FK_CATEGORIES_1" on-delete="" on-update="" referenced-key="SQL070831021754850" referenced-table="CATEGORIES" referenced-table-schema="APP" remarks="" source-entity-role="" source-multiplicity="0..*" source-relationship-type="" target-entity-role="" target-multiplicity="1" target-relationship-type="">
+<foreign-key-description></foreign-key-description>
+<foreign-key-figure>
+<fk-fig-bendpoint-list/>
+</foreign-key-figure>
+<foreign-key-column column-name="PARENT_ID" referenced-key-column-name="CATEGORIES_ID"/>
+</foreign-key>
+</foreign-key-list>
 <index-list>
 <index alias="" name="SQL070831021754850" remarks="" unique="true">
 <index-description></index-description>
@@ -413,7 +421,7 @@
 </table>
 <table alias="" name="CATEGORIES_DESCRIPTION" remarks="">
 <table-description></table-description>
-<table-figure-bounds height="-1" width="-1" x="825" y="2651"/>
+<table-figure-bounds height="-1" width="-1" x="856" y="2667"/>
 <column-list>
 <column alias="" auto-increment="false" column-size="10" decimal-digits="0" default-value="0" mandatory="true" name="CATEGORIES_ID" remarks="">
 <column-description></column-description>
@@ -1200,12 +1208,6 @@
 <variant precision-max="4000" precision-min="1" precision-variable="%n" type-name-pattern="VARCHAR(%n)"/>
 </data-type>
 </column>
-<column alias="" auto-increment="false" column-size="10" decimal-digits="0" default-value="" mandatory="true" name="LANGUAGES_ID" remarks="">
-<column-description></column-description>
-<data-type jdbc-type="4" name="INTEGER" selected-variant-pattern="INTEGER">
-<variant type-name-pattern="INTEGER"/>
-</data-type>
-</column>
 </column-list>
 <primary-key alias="" name="SQL070831021756230" remarks="">
 <primary-key-description></primary-key-description>
@@ -1226,7 +1228,7 @@
 <foreign-key-figure>
 <fk-fig-bendpoint-list/>
 </foreign-key-figure>
-<foreign-key-column column-name="LANGUAGES_ID" referenced-key-column-name="LANGUAGES_ID"/>
+<foreign-key-column column-name="LANGUAGE_ID" referenced-key-column-name="LANGUAGES_ID"/>
 </foreign-key>
 </foreign-key-list>
 <index-list>
@@ -2172,41 +2174,21 @@
 </table>
 <table alias="" name="ORDERS_STATUS" remarks="">
 <table-description></table-description>
-<table-figure-bounds height="-1" width="-1" x="737" y="1048"/>
+<table-figure-bounds height="-1" width="-1" x="808" y="1059"/>
 <column-list>
-<column alias="" auto-increment="false" column-size="0" decimal-digits="0" default-value="AUTOINCREMENT: start 1 increment 1" mandatory="true" name="ORDERS_STATUS_ID" remarks="">
+<column alias="" auto-increment="false" column-size="0" decimal-digits="0" default-value="0" mandatory="true" name="ORDERS_STATUS_ID" remarks="">
 <column-description></column-description>
 <data-type jdbc-type="4" name="INTEGER" selected-variant-pattern="INTEGER">
 <variant type-name-pattern="INTEGER"/>
 </data-type>
 </column>
-<column alias="" auto-increment="false" column-size="10" decimal-digits="0" default-value="1" mandatory="true" name="LANGUAGE_ID" remarks="">
-<column-description></column-description>
-<data-type jdbc-type="4" name="INTEGER" selected-variant-pattern="INTEGER">
-<variant type-name-pattern="INTEGER"/>
-</data-type>
-</column>
-<column alias="" auto-increment="false" column-size="32" decimal-digits="0" default-value="" mandatory="true" name="ORDERS_STATUS_NAME" remarks="">
-<column-description></column-description>
-<data-type jdbc-type="12" literal-prefix="'" literal-suffix="'" name="VARCHAR" selected-variant-pattern="VARCHAR(%n)">
-<variant precision-max="4000" precision-min="1" precision-variable="%n" type-name-pattern="VARCHAR(%n)"/>
-</data-type>
-</column>
 </column-list>
 <primary-key alias="" name="SQL070831021756000" remarks="">
 <primary-key-description></primary-key-description>
 <primary-key-column name="ORDERS_STATUS_ID"/>
 </primary-key>
 <unique-key-list/>
-<foreign-key-list>
-<foreign-key alias="" name="FK_ORDERS_STATUS_1" on-delete="" on-update="" referenced-key="SQL070831021755250" referenced-table="LANGUAGES" referenced-table-schema="APP" remarks="" source-entity-role="" source-multiplicity="0..*" source-relationship-type="" target-entity-role="" target-multiplicity="1" target-relationship-type="">
-<foreign-key-description></foreign-key-description>
-<foreign-key-figure>
-<fk-fig-bendpoint-list/>
-</foreign-key-figure>
-<foreign-key-column column-name="LANGUAGE_ID" referenced-key-column-name="LANGUAGES_ID"/>
-</foreign-key>
-</foreign-key-list>
+<foreign-key-list/>
 <index-list>
 <index alias="" name="SQL070831021756000" remarks="" unique="true">
 <index-description></index-description>
@@ -2271,6 +2253,13 @@
 </foreign-key-figure>
 <foreign-key-column column-name="ORDERS_STATUS_ID" referenced-key-column-name="ORDERS_STATUS_ID"/>
 </foreign-key>
+<foreign-key alias="" name="FK_ORDERS_STATUS_HISTORY_2" on-delete="" on-update="" referenced-key="SQL070831021755840" referenced-table="ORDERS" referenced-table-schema="APP" remarks="" source-entity-role="" source-multiplicity="0..*" source-relationship-type="" target-entity-role="" target-multiplicity="1" target-relationship-type="">
+<foreign-key-description></foreign-key-description>
+<foreign-key-figure>
+<fk-fig-bendpoint-list/>
+</foreign-key-figure>
+<foreign-key-column column-name="ORDERS_ID" referenced-key-column-name="ORDERS_ID"/>
+</foreign-key>
 </foreign-key-list>
 <index-list>
 <index alias="" name="SQL070831021756030" remarks="" unique="true">
@@ -2483,7 +2472,7 @@
 </table>
 <table alias="" name="PRODUCTS_ATTRIBUTES" remarks="">
 <table-description></table-description>
-<table-figure-bounds height="-1" width="-1" x="406" y="1908"/>
+<table-figure-bounds height="-1" width="-1" x="296" y="1843"/>
 <column-list>
 <column alias="" auto-increment="true" column-size="10" decimal-digits="0" default-value="AUTOINCREMENT: start 1 increment 1" mandatory="true" name="PRODUCTS_ATTRIBUTES_ID" remarks="">
 <column-description></column-description>
@@ -2538,6 +2527,20 @@
 </foreign-key-figure>
 <foreign-key-column column-name="PRODUCTS_ID" referenced-key-column-name="PRODUCTS_ID"/>
 </foreign-key>
+<foreign-key alias="" name="FK_PRODUCTS_ATTRIBUTES_2" on-delete="" on-update="" referenced-key="SQL070831021755700" referenced-table="PRODUCTS_OPTIONS" referenced-table-schema="APP" remarks="" source-entity-role="" source-multiplicity="0..*" source-relationship-type="" target-entity-role="" target-multiplicity="1" target-relationship-type="">
+<foreign-key-description></foreign-key-description>
+<foreign-key-figure>
+<fk-fig-bendpoint-list/>
+</foreign-key-figure>
+<foreign-key-column column-name="OPTIONS_ID" referenced-key-column-name="PRODUCTS_OPTIONS_ID"/>
+</foreign-key>
+<foreign-key alias="" name="FK_PRODUCTS_ATTRIBUTES_3" on-delete="" on-update="" referenced-key="SQL070831021755720" referenced-table="PRODUCTS_OPTIONS_VALUES" referenced-table-schema="APP" remarks="" source-entity-role="" source-multiplicity="0..*" source-relationship-type="" target-entity-role="" target-multiplicity="1" target-relationship-type="">
+<foreign-key-description></foreign-key-description>
+<foreign-key-figure>
+<fk-fig-bendpoint-list/>
+</foreign-key-figure>
+<foreign-key-column column-name="OPTIONS_VALUES_ID" referenced-key-column-name="PRODUCTS_OPTIONS_VALUES_ID"/>
+</foreign-key>
 </foreign-key-list>
 <index-list>
 <index alias="" name="SQL070831021755500" remarks="" unique="true">
@@ -2602,7 +2605,7 @@
 </table>
 <table alias="" name="PRODUCTS_DESCRIPTION" remarks="">
 <table-description></table-description>
-<table-figure-bounds height="-1" width="-1" x="384" y="2855"/>
+<table-figure-bounds height="-1" width="-1" x="432" y="2886"/>
 <column-list>
 <column alias="" auto-increment="false" column-size="10" decimal-digits="0" default-value="" mandatory="true" name="PRODUCTS_ID" remarks="">
 <column-description></column-description>
@@ -2733,7 +2736,7 @@
 </table>
 <table alias="" name="PRODUCTS_OPTIONS" remarks="">
 <table-description></table-description>
-<table-figure-bounds height="-1" width="-1" x="1108" y="1951"/>
+<table-figure-bounds height="-1" width="-1" x="697" y="1757"/>
 <column-list>
 <column alias="" auto-increment="false" column-size="0" decimal-digits="0" default-value="AUTOINCREMENT: start 1 increment 1" mandatory="true" name="PRODUCTS_OPTIONS_ID" remarks="">
 <column-description></column-description>
@@ -2741,44 +2744,23 @@
 <variant type-name-pattern="INTEGER"/>
 </data-type>
 </column>
-<column alias="" auto-increment="false" column-size="0" decimal-digits="0" default-value="1" mandatory="true" name="LANGUAGE_ID" remarks="">
-<column-description></column-description>
-<data-type jdbc-type="4" name="INTEGER" selected-variant-pattern="INTEGER">
-<variant type-name-pattern="INTEGER"/>
-</data-type>
-</column>
-<column alias="" auto-increment="false" column-size="32" decimal-digits="0" default-value="''" mandatory="true" name="PRODUCTS_OPTIONS_NAME" remarks="">
-<column-description></column-description>
-<data-type jdbc-type="12" literal-prefix="'" literal-suffix="'" name="VARCHAR" selected-variant-pattern="VARCHAR(%n)">
-<variant precision-max="4000" precision-min="1" precision-variable="%n" type-name-pattern="VARCHAR(%n)"/>
-</data-type>
-</column>
 </column-list>
 <primary-key alias="" name="SQL070831021755700" remarks="">
 <primary-key-description></primary-key-description>
 <primary-key-column name="PRODUCTS_OPTIONS_ID"/>
 </primary-key>
 <unique-key-list/>
-<foreign-key-list>
-<foreign-key alias="" name="FK_PRODUCTS_OPTIONS_1" on-delete="" on-update="" referenced-key="SQL070831021755250" referenced-table="LANGUAGES" referenced-table-schema="APP" remarks="" source-entity-role="" source-multiplicity="0..*" source-relationship-type="" target-entity-role="" target-multiplicity="1" target-relationship-type="">
-<foreign-key-description></foreign-key-description>
-<foreign-key-figure>
-<fk-fig-bendpoint-list/>
-</foreign-key-figure>
-<foreign-key-column column-name="LANGUAGE_ID" referenced-key-column-name="LANGUAGES_ID"/>
-</foreign-key>
-</foreign-key-list>
+<foreign-key-list/>
 <index-list>
 <index alias="" name="SQL070831021755700" remarks="" unique="true">
 <index-description></index-description>
 <index-column name="PRODUCTS_OPTIONS_ID" sort="ASC"/>
-<index-column name="LANGUAGE_ID" sort="ASC"/>
 </index>
 </index-list>
 </table>
 <table alias="" name="PRODUCTS_OPTIONS_VALUES" remarks="">
 <table-description></table-description>
-<table-figure-bounds height="-1" width="-1" x="743" y="1920"/>
+<table-figure-bounds height="-1" width="-1" x="721" y="2009"/>
 <column-list>
 <column alias="" auto-increment="false" column-size="0" decimal-digits="0" default-value="AUTOINCREMENT: start 1 increment 1" mandatory="true" name="PRODUCTS_OPTIONS_VALUES_ID" remarks="">
 <column-description></column-description>
@@ -2786,44 +2768,23 @@
 <variant type-name-pattern="INTEGER"/>
 </data-type>
 </column>
-<column alias="" auto-increment="false" column-size="0" decimal-digits="0" default-value="1" mandatory="true" name="LANGUAGE_ID" remarks="">
-<column-description></column-description>
-<data-type jdbc-type="4" name="INTEGER" selected-variant-pattern="INTEGER">
-<variant type-name-pattern="INTEGER"/>
-</data-type>
-</column>
-<column alias="" auto-increment="false" column-size="64" decimal-digits="0" default-value="''" mandatory="true" name="PRODUCTS_OPTIONS_VALUES_NAME" remarks="">
-<column-description></column-description>
-<data-type jdbc-type="12" literal-prefix="'" literal-suffix="'" name="VARCHAR" selected-variant-pattern="VARCHAR(%n)">
-<variant precision-max="4000" precision-min="1" precision-variable="%n" type-name-pattern="VARCHAR(%n)"/>
-</data-type>
-</column>
 </column-list>
 <primary-key alias="" name="SQL070831021755720" remarks="">
 <primary-key-description></primary-key-description>
 <primary-key-column name="PRODUCTS_OPTIONS_VALUES_ID"/>
 </primary-key>
 <unique-key-list/>
-<foreign-key-list>
-<foreign-key alias="" name="FK_PRODUCTS_OPTIONS_VALUES_1" on-delete="" on-update="" referenced-key="SQL070831021755250" referenced-table="LANGUAGES" referenced-table-schema="APP" remarks="" source-entity-role="" source-multiplicity="0..*" source-relationship-type="" target-entity-role="" target-multiplicity="1" target-relationship-type="">
-<foreign-key-description></foreign-key-description>
-<foreign-key-figure>
-<fk-fig-bendpoint-list/>
-</foreign-key-figure>
-<foreign-key-column column-name="LANGUAGE_ID" referenced-key-column-name="LANGUAGES_ID"/>
-</foreign-key>
-</foreign-key-list>
+<foreign-key-list/>
 <index-list>
 <index alias="" name="SQL070831021755720" remarks="" unique="true">
 <index-description></index-description>
 <index-column name="PRODUCTS_OPTIONS_VALUES_ID" sort="ASC"/>
-<index-column name="LANGUAGE_ID" sort="ASC"/>
 </index>
 </index-list>
 </table>
 <table alias="" name="PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS" remarks="">
 <table-description></table-description>
-<table-figure-bounds height="-1" width="-1" x="827" y="1793"/>
+<table-figure-bounds height="-1" width="-1" x="737" y="1866"/>
 <column-list>
 <column alias="" auto-increment="false" column-size="0" decimal-digits="0" default-value="AUTOINCREMENT: start 1 increment 1" mandatory="true" name="PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID" remarks="">
 <column-description></column-description>
@@ -3516,6 +3477,147 @@
 </index>
 </index-list>
 </table>
+<table alias="" name="ORDERS_STATUS_DESCRIPTION" remarks="">
+<table-description></table-description>
+<table-figure-bounds height="89" width="273" x="1032" y="1180"/>
+<column-list>
+<column alias="" auto-increment="false" column-size="0" decimal-digits="0" default-value="" mandatory="true" name="ORDERS_STATUS_ID" remarks="">
+<column-description></column-description>
+<data-type jdbc-type="4" name="INTEGER" selected-variant-pattern="INTEGER">
+<variant type-name-pattern="INTEGER"/>
+</data-type>
+</column>
+<column alias="" auto-increment="false" column-size="0" decimal-digits="0" default-value="" mandatory="true" name="LANGUAGE_ID" remarks="">
+<column-description></column-description>
+<data-type jdbc-type="4" name="INTEGER" selected-variant-pattern="INTEGER">
+<variant type-name-pattern="INTEGER"/>
+</data-type>
+</column>
+<column alias="" auto-increment="false" column-size="32" decimal-digits="0" default-value="" mandatory="true" name="ORDERS_STATUS_NAME" remarks="">
+<column-description></column-description>
+<data-type jdbc-type="12" literal-prefix="'" literal-suffix="'" name="VARCHAR" selected-variant-pattern="VARCHAR(%n)">
+<variant precision-max="4000" precision-min="1" precision-variable="%n" type-name-pattern="VARCHAR(%n)"/>
+</data-type>
+</column>
+</column-list>
+<primary-key alias="" name="PK_ORDERS_STATUS_DESCRIPTION" remarks="">
+<primary-key-description></primary-key-description>
+<primary-key-column name="ORDERS_STATUS_ID"/>
+<primary-key-column name="LANGUAGE_ID"/>
+</primary-key>
+<unique-key-list/>
+<foreign-key-list>
+<foreign-key alias="" name="FK_ORDERS_STATUS_DESCRIPTION_1" on-delete="" on-update="" referenced-key="SQL070831021756000" referenced-table="ORDERS_STATUS" referenced-table-schema="APP" remarks="" source-entity-role="" source-multiplicity="0..*" source-relationship-type="" target-entity-role="" target-multiplicity="1" target-relationship-type="">
+<foreign-key-description></foreign-key-description>
+<foreign-key-figure>
+<fk-fig-bendpoint-list/>
+</foreign-key-figure>
+<foreign-key-column column-name="ORDERS_STATUS_ID" referenced-key-column-name="ORDERS_STATUS_ID"/>
+</foreign-key>
+<foreign-key alias="" name="FK_ORDERS_STATUS_DESCRIPTION_2" on-delete="" on-update="" referenced-key="SQL070831021755250" referenced-table="LANGUAGES" referenced-table-schema="APP" remarks="" source-entity-role="" source-multiplicity="0..*" source-relationship-type="" target-entity-role="" target-multiplicity="1" target-relationship-type="">
+<foreign-key-description></foreign-key-description>
+<foreign-key-figure>
+<fk-fig-bendpoint-list/>
+</foreign-key-figure>
+<foreign-key-column column-name="LANGUAGE_ID" referenced-key-column-name="LANGUAGES_ID"/>
+</foreign-key>
+</foreign-key-list>
+<index-list/>
+</table>
+<table alias="" name="PRODUCTS_OPTIONS_DESCRIPTION" remarks="">
+<table-description></table-description>
+<table-figure-bounds height="79" width="308" x="1066" y="1780"/>
+<column-list>
+<column alias="" auto-increment="false" column-size="0" decimal-digits="0" default-value="" mandatory="true" name="PRODUCTS_OPTIONS_ID" remarks="">
+<column-description></column-description>
+<data-type jdbc-type="4" name="INTEGER" selected-variant-pattern="INTEGER">
+<variant type-name-pattern="INTEGER"/>
+</data-type>
+</column>
+<column alias="" auto-increment="false" column-size="0" decimal-digits="0" default-value="" mandatory="true" name="LANGUAGE_ID" remarks="">
+<column-description></column-description>
+<data-type jdbc-type="4" name="INTEGER" selected-variant-pattern="INTEGER">
+<variant type-name-pattern="INTEGER"/>
+</data-type>
+</column>
+<column alias="" auto-increment="false" column-size="32" decimal-digits="0" default-value="" mandatory="true" name="PRODUCTS_OPTIONS_NAME" remarks="">
+<column-description></column-description>
+<data-type jdbc-type="12" literal-prefix="'" literal-suffix="'" name="VARCHAR" selected-variant-pattern="VARCHAR(%n)">
+<variant precision-max="4000" precision-min="1" precision-variable="%n" type-name-pattern="VARCHAR(%n)"/>
+</data-type>
+</column>
+</column-list>
+<primary-key alias="" name="PK_PRODUCTS_OPTIONS_DESCRIPTION" remarks="">
+<primary-key-description></primary-key-description>
+<primary-key-column name="PRODUCTS_OPTIONS_ID"/>
+<primary-key-column name="LANGUAGE_ID"/>
+</primary-key>
+<unique-key-list/>
+<foreign-key-list>
+<foreign-key alias="" name="FK_PRODUCTS_OPTIONS_DESCRIPTION_1" on-delete="" on-update="" referenced-key="SQL070831021755700" referenced-table="PRODUCTS_OPTIONS" referenced-table-schema="APP" remarks="" source-entity-role="" source-multiplicity="0..*" source-relationship-type="" target-entity-role="" target-multiplicity="1" target-relationship-type="">
+<foreign-key-description></foreign-key-description>
+<foreign-key-figure>
+<fk-fig-bendpoint-list/>
+</foreign-key-figure>
+<foreign-key-column column-name="PRODUCTS_OPTIONS_ID" referenced-key-column-name="PRODUCTS_OPTIONS_ID"/>
+</foreign-key>
+<foreign-key alias="" name="FK_PRODUCTS_OPTIONS_DESCRIPTION_2" on-delete="" on-update="" referenced-key="SQL070831021755250" referenced-table="LANGUAGES" referenced-table-schema="APP" remarks="" source-entity-role="" source-multiplicity="0..*" source-relationship-type="" target-entity-role="" target-multiplicity="1" target-relationship-type="">
+<foreign-key-description></foreign-key-description>
+<foreign-key-figure>
+<fk-fig-bendpoint-list/>
+</foreign-key-figure>
+<foreign-key-column column-name="LANGUAGE_ID" referenced-key-column-name="LANGUAGES_ID"/>
+</foreign-key>
+</foreign-key-list>
+<index-list/>
+</table>
+<table alias="" name="PRODUCTS_OPTIONS_VALUES_DESCRIPTION" remarks="">
+<table-description></table-description>
+<table-figure-bounds height="79" width="318" x="956" y="2101"/>
+<column-list>
+<column alias="" auto-increment="false" column-size="0" decimal-digits="0" default-value="" mandatory="true" name="PRODUCTS_OPTIONS_VALUES_ID" remarks="">
+<column-description></column-description>
+<data-type jdbc-type="4" name="INTEGER" selected-variant-pattern="INTEGER">
+<variant type-name-pattern="INTEGER"/>
+</data-type>
+</column>
+<column alias="" auto-increment="false" column-size="0" decimal-digits="0" default-value="" mandatory="true" name="LANGUAGE_ID" remarks="">
+<column-description></column-description>
+<data-type jdbc-type="4" name="INTEGER" selected-variant-pattern="INTEGER">
+<variant type-name-pattern="INTEGER"/>
+</data-type>
+</column>
+<column alias="" auto-increment="false" column-size="64" decimal-digits="0" default-value="" mandatory="true" name="PRODUCTS_OPTIONS_VALUES_NAME" remarks="">
+<column-description></column-description>
+<data-type jdbc-type="12" literal-prefix="'" literal-suffix="'" name="VARCHAR" selected-variant-pattern="VARCHAR(%n)">
+<variant precision-max="4000" precision-min="1" precision-variable="%n" type-name-pattern="VARCHAR(%n)"/>
+</data-type>
+</column>
+</column-list>
+<primary-key alias="" name="PK_PRODUCTS_OPTIONS_VALUES_DESCRIPTION" remarks="">
+<primary-key-description></primary-key-description>
+<primary-key-column name="PRODUCTS_OPTIONS_VALUES_ID"/>
+<primary-key-column name="LANGUAGE_ID"/>
+</primary-key>
+<unique-key-list/>
+<foreign-key-list>
+<foreign-key alias="" name="FK_PRODUCTS_OPTIONS_VALUES_DESCRIPTION_1" on-delete="" on-update="" referenced-key="SQL070831021755720" referenced-table="PRODUCTS_OPTIONS_VALUES" referenced-table-schema="APP" remarks="" source-entity-role="" source-multiplicity="0..*" source-relationship-type="" target-entity-role="" target-multiplicity="1" target-relationship-type="">
+<foreign-key-description></foreign-key-description>
+<foreign-key-figure>
+<fk-fig-bendpoint-list/>
+</foreign-key-figure>
+<foreign-key-column column-name="PRODUCTS_OPTIONS_VALUES_ID" referenced-key-column-name="PRODUCTS_OPTIONS_VALUES_ID"/>
+</foreign-key>
+<foreign-key alias="" name="FK_PRODUCTS_OPTIONS_VALUES_DESCRIPTION_2" on-delete="" on-update="" referenced-key="SQL070831021755250" referenced-table="LANGUAGES" referenced-table-schema="APP" remarks="" source-entity-role="" source-multiplicity="0..*" source-relationship-type="" target-entity-role="" target-multiplicity="1" target-relationship-type="">
+<foreign-key-description></foreign-key-description>
+<foreign-key-figure>
+<fk-fig-bendpoint-list/>
+</foreign-key-figure>
+<foreign-key-column column-name="LANGUAGE_ID" referenced-key-column-name="LANGUAGES_ID"/>
+</foreign-key>
+</foreign-key-list>
+<index-list/>
+</table>
 </table-list>
 </schema>
 </schema-list>

Modified: pompei/portlets/pompei-core/trunk/src/main/webapp/WEB-INF/db/create_table.sql
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/webapp/WEB-INF/db/create_table.sql	2007-09-03 07:48:37 UTC (rev 527)
+++ pompei/portlets/pompei-core/trunk/src/main/webapp/WEB-INF/db/create_table.sql	2007-09-03 14:30:41 UTC (rev 528)
@@ -14,16 +14,6 @@
      , PRIMARY KEY (BANNERS_ID)
 );
 
-CREATE TABLE CATEGORIES (
-       CATEGORIES_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1)
-     , CATEGORIES_IMAGE VARCHAR(64)
-     , PARENT_ID INTEGER DEFAULT 0 NOT NULL
-     , SORT_ORDER INTEGER
-     , DATE_ADDED TIMESTAMP
-     , LAST_MODIFIED TIMESTAMP
-     , PRIMARY KEY (CATEGORIES_ID)
-);
-
 CREATE TABLE CONFIGURATION_GROUP (
        CONFIGURATION_GROUP_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1)
      , CONFIGURATION_GROUP_TITLE VARCHAR(64) NOT NULL
@@ -132,6 +122,21 @@
      , PRIMARY KEY (NEWSLETTERS_ID)
 );
 
+CREATE TABLE ORDERS_STATUS (
+       ORDERS_STATUS_ID INTEGER DEFAULT 0 NOT NULL
+     , PRIMARY KEY (ORDERS_STATUS_ID)
+);
+
+CREATE TABLE PRODUCTS_OPTIONS (
+       PRODUCTS_OPTIONS_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1)
+     , PRIMARY KEY (PRODUCTS_OPTIONS_ID)
+);
+
+CREATE TABLE PRODUCTS_OPTIONS_VALUES (
+       PRODUCTS_OPTIONS_VALUES_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1)
+     , PRIMARY KEY (PRODUCTS_OPTIONS_VALUES_ID)
+);
+
 CREATE TABLE SESSIONS (
        SESSKEY VARCHAR(32) NOT NULL
      , EXPIRY INTEGER NOT NULL
@@ -155,13 +160,6 @@
      , PRIMARY KEY (ADDRESS_FORMAT_ID)
 );
 
-CREATE TABLE ORDERS_STATUS (
-       ORDERS_STATUS_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1)
-     , LANGUAGE_ID INTEGER DEFAULT 1 NOT NULL
-     , ORDERS_STATUS_NAME VARCHAR(32) NOT NULL
-     , PRIMARY KEY (ORDERS_STATUS_ID)
-);
-
 CREATE TABLE ORDERS (
        ORDERS_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1)
      , CUSTOMERS_ID INTEGER NOT NULL
@@ -231,20 +229,16 @@
      , PRIMARY KEY (PRODUCTS_ID)
 );
 
-CREATE TABLE PRODUCTS_OPTIONS (
-       PRODUCTS_OPTIONS_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1)
-     , LANGUAGE_ID INTEGER DEFAULT 1 NOT NULL
-     , PRODUCTS_OPTIONS_NAME VARCHAR(32) DEFAULT '' NOT NULL
-     , PRIMARY KEY (PRODUCTS_OPTIONS_ID)
+CREATE TABLE CATEGORIES (
+       CATEGORIES_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1)
+     , CATEGORIES_IMAGE VARCHAR(64)
+     , PARENT_ID INTEGER DEFAULT 0
+     , SORT_ORDER INTEGER
+     , DATE_ADDED TIMESTAMP
+     , LAST_MODIFIED TIMESTAMP
+     , PRIMARY KEY (CATEGORIES_ID)
 );
 
-CREATE TABLE PRODUCTS_OPTIONS_VALUES (
-       PRODUCTS_OPTIONS_VALUES_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1)
-     , LANGUAGE_ID INTEGER DEFAULT 1 NOT NULL
-     , PRODUCTS_OPTIONS_VALUES_NAME VARCHAR(64) DEFAULT '' NOT NULL
-     , PRIMARY KEY (PRODUCTS_OPTIONS_VALUES_ID)
-);
-
 CREATE TABLE REVIEWS (
        REVIEWS_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1)
      , PRODUCTS_ID INTEGER NOT NULL
@@ -339,7 +333,6 @@
        DELIVERY_METHOD_ID INTEGER DEFAULT 0 NOT NULL
      , LANGUAGE_ID INTEGER DEFAULT 1 NOT NULL
      , DELIVERY_METHOD_NAME VARCHAR(32) NOT NULL
-     , LANGUAGES_ID INTEGER NOT NULL
      , PRIMARY KEY (DELIVERY_METHOD_ID, LANGUAGE_ID)
 );
 
@@ -499,6 +492,27 @@
      , PRIMARY KEY (ASSOCIATION_ID)
 );
 
+CREATE TABLE ORDERS_STATUS_DESCRIPTION (
+       ORDERS_STATUS_ID INTEGER NOT NULL
+     , LANGUAGE_ID INTEGER NOT NULL
+     , ORDERS_STATUS_NAME VARCHAR(32) NOT NULL
+     , PRIMARY KEY (ORDERS_STATUS_ID, LANGUAGE_ID)
+);
+
+CREATE TABLE PRODUCTS_OPTIONS_DESCRIPTION (
+       PRODUCTS_OPTIONS_ID INTEGER NOT NULL
+     , LANGUAGE_ID INTEGER NOT NULL
+     , PRODUCTS_OPTIONS_NAME VARCHAR(32) NOT NULL
+     , PRIMARY KEY (PRODUCTS_OPTIONS_ID, LANGUAGE_ID)
+);
+
+CREATE TABLE PRODUCTS_OPTIONS_VALUES_DESCRIPTION (
+       PRODUCTS_OPTIONS_VALUES_ID INTEGER NOT NULL
+     , LANGUAGE_ID INTEGER NOT NULL
+     , PRODUCTS_OPTIONS_VALUES_NAME VARCHAR(64) NOT NULL
+     , PRIMARY KEY (PRODUCTS_OPTIONS_VALUES_ID, LANGUAGE_ID)
+);
+
 CREATE TABLE ADDRESS_BOOK (
        ADDRESS_BOOK_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1)
      , CUSTOMERS_ID INTEGER NOT NULL
@@ -520,11 +534,6 @@
      , PRIMARY KEY (ADDRESS_BOOK_ID)
 );
 
-ALTER TABLE ORDERS_STATUS
-  ADD CONSTRAINT FK_ORDERS_STATUS_1
-      FOREIGN KEY (LANGUAGE_ID)
-      REFERENCES LANGUAGES (LANGUAGES_ID);
-
 ALTER TABLE ORDERS
   ADD CONSTRAINT SQL070831021756810
       FOREIGN KEY (CUSTOMERS_ID)
@@ -566,16 +575,11 @@
       FOREIGN KEY (PRODUCTS_TAX_CLASS_ID)
       REFERENCES TAX_CLASS (TAX_CLASS_ID);
 
-ALTER TABLE PRODUCTS_OPTIONS
-  ADD CONSTRAINT FK_PRODUCTS_OPTIONS_1
-      FOREIGN KEY (LANGUAGE_ID)
-      REFERENCES LANGUAGES (LANGUAGES_ID);
+ALTER TABLE CATEGORIES
+  ADD CONSTRAINT FK_CATEGORIES_1
+      FOREIGN KEY (PARENT_ID)
+      REFERENCES CATEGORIES (CATEGORIES_ID);
 
-ALTER TABLE PRODUCTS_OPTIONS_VALUES
-  ADD CONSTRAINT FK_PRODUCTS_OPTIONS_VALUES_1
-      FOREIGN KEY (LANGUAGE_ID)
-      REFERENCES LANGUAGES (LANGUAGES_ID);
-
 ALTER TABLE REVIEWS
   ADD CONSTRAINT FK_REVIEWS_1
       FOREIGN KEY (PRODUCTS_ID)
@@ -593,6 +597,16 @@
    ON DELETE NO ACTION
    ON UPDATE NO ACTION;
 
+ALTER TABLE PRODUCTS_ATTRIBUTES
+  ADD CONSTRAINT FK_PRODUCTS_ATTRIBUTES_2
+      FOREIGN KEY (OPTIONS_ID)
+      REFERENCES PRODUCTS_OPTIONS (PRODUCTS_OPTIONS_ID);
+
+ALTER TABLE PRODUCTS_ATTRIBUTES
+  ADD CONSTRAINT FK_PRODUCTS_ATTRIBUTES_3
+      FOREIGN KEY (OPTIONS_VALUES_ID)
+      REFERENCES PRODUCTS_OPTIONS_VALUES (PRODUCTS_OPTIONS_VALUES_ID);
+
 ALTER TABLE BANNERS_HISTORY
   ADD CONSTRAINT FK_BANNERS_HISTORY_1
       FOREIGN KEY (BANNERS_ID)
@@ -659,7 +673,7 @@
 
 ALTER TABLE DELIVERY_METHOD_DESCRIPTION
   ADD CONSTRAINT FK_DELIVERY_METHOD_DESCRIPTION_2
-      FOREIGN KEY (LANGUAGES_ID)
+      FOREIGN KEY (LANGUAGE_ID)
       REFERENCES LANGUAGES (LANGUAGES_ID);
 
 ALTER TABLE MANUFACTURERS_INFO
@@ -715,6 +729,11 @@
    ON DELETE NO ACTION
    ON UPDATE NO ACTION;
 
+ALTER TABLE ORDERS_STATUS_HISTORY
+  ADD CONSTRAINT FK_ORDERS_STATUS_HISTORY_2
+      FOREIGN KEY (ORDERS_ID)
+      REFERENCES ORDERS (ORDERS_ID);
+
 ALTER TABLE ORDERS_TOTAL
   ADD CONSTRAINT FK_ORDERS_TOTAL_1
       FOREIGN KEY (ORDERS_ID)
@@ -809,6 +828,36 @@
       FOREIGN KEY (GEO_ZONE_ID)
       REFERENCES GEO_ZONES (GEO_ZONE_ID);
 
+ALTER TABLE ORDERS_STATUS_DESCRIPTION
+  ADD CONSTRAINT FK_ORDERS_STATUS_DESCRIPTION_1
+      FOREIGN KEY (ORDERS_STATUS_ID)
+      REFERENCES ORDERS_STATUS (ORDERS_STATUS_ID);
+
+ALTER TABLE ORDERS_STATUS_DESCRIPTION
+  ADD CONSTRAINT FK_ORDERS_STATUS_DESCRIPTION_2
+      FOREIGN KEY (LANGUAGE_ID)
+      REFERENCES LANGUAGES (LANGUAGES_ID);
+
+ALTER TABLE PRODUCTS_OPTIONS_DESCRIPTION
+  ADD CONSTRAINT FK_PRODUCTS_OPTIONS_DESCRIPTION_1
+      FOREIGN KEY (PRODUCTS_OPTIONS_ID)
+      REFERENCES PRODUCTS_OPTIONS (PRODUCTS_OPTIONS_ID);
+
+ALTER TABLE PRODUCTS_OPTIONS_DESCRIPTION
+  ADD CONSTRAINT FK_PRODUCTS_OPTIONS_DESCRIPTION_2
+      FOREIGN KEY (LANGUAGE_ID)
+      REFERENCES LANGUAGES (LANGUAGES_ID);
+
+ALTER TABLE PRODUCTS_OPTIONS_VALUES_DESCRIPTION
+  ADD CONSTRAINT FK_PRODUCTS_OPTIONS_VALUES_DESCRIPTION_1
+      FOREIGN KEY (PRODUCTS_OPTIONS_VALUES_ID)
+      REFERENCES PRODUCTS_OPTIONS_VALUES (PRODUCTS_OPTIONS_VALUES_ID);
+
+ALTER TABLE PRODUCTS_OPTIONS_VALUES_DESCRIPTION
+  ADD CONSTRAINT FK_PRODUCTS_OPTIONS_VALUES_DESCRIPTION_2
+      FOREIGN KEY (LANGUAGE_ID)
+      REFERENCES LANGUAGES (LANGUAGES_ID);
+
 ALTER TABLE ADDRESS_BOOK
   ADD CONSTRAINT FK_ADDRESS_BOOK_2
       FOREIGN KEY (ENTRY_ZONE_ID)


pal-cvs メーリングリストの案内