[Svn-src-all:849] [version-2_5-dev 19736] #627(ソース整形・ソースコメントの改善)

Seasoft admin @ mail.ec-cube.net
2010年 12月 17日 (金) 03:22:08 JST


Subversion committed to /home/svn/open 19736
http://svn.ec-cube.net/open_trac/changeset/19736
┌────────────────────────────┐
│更新者 :  Seasoft                                      │
│更新日時:  2010-12-17 03:22:08 +0900 (金, 17 12月 2010)│
└────────────────────────────┘

Log:
--------------------------------------------------------
#627(ソース整形・ソースコメントの改善)
#554(MySQL と PostgreSQL でテーブル定義が異なる)

Changed:                      [U:修正,A:追加,D:削除]
--------------------------------------------------------
U   branches/version-2_5-dev/html/install/sql/create_table_mysql.sql
U   branches/version-2_5-dev/html/install/sql/create_table_pgsql.sql

変更: branches/version-2_5-dev/html/install/sql/create_table_mysql.sql
===================================================================
--- branches/version-2_5-dev/html/install/sql/create_table_mysql.sql	2010-12-16 17:13:36 UTC (rev 19735)
+++ branches/version-2_5-dev/html/install/sql/create_table_mysql.sql	2010-12-16 18:22:08 UTC (rev 19736)
@@ -314,7 +314,7 @@
     product_class_id int  NOT NULL,
     product_id int NOT NULL,
     class_combination_id int,
-    product_type_id smallint NOT NULL DEFAULT 0,
+    product_type_id int NOT NULL DEFAULT 0,
     product_code text,
     stock numeric,
     stock_unlimited smallint NOT NULL DEFAULT 0,
@@ -821,12 +821,12 @@
     target_id int NOT NULL,
     bloc_id int NOT NULL,
     bloc_row int,
-    anywhere int DEFAULT 0 NOT NULL,
+    anywhere smallint DEFAULT 0 NOT NULL,
     PRIMARY KEY (device_type_id, page_id, target_id, bloc_id)
 ) TYPE=InnoDB;
 
 CREATE TABLE dtb_csv (
-    no int ,
+    no int,
     csv_id int NOT NULL,
     col text,
     disp_name text,
@@ -839,7 +839,7 @@
 ) TYPE=InnoDB;
 
 CREATE TABLE dtb_csv_sql (
-    sql_id int ,
+    sql_id int,
     sql_name text NOT NULL,
     csv_sql text,
     update_date datetime NOT NULL,
@@ -847,8 +847,7 @@
     PRIMARY KEY (sql_id)
 ) TYPE=InnoDB;
 
-CREATE TABLE dtb_templates
-(
+CREATE TABLE dtb_templates (
     template_code varchar(50) NOT NULL,
     template_name text,
     create_date datetime NOT NULL,
@@ -856,9 +855,8 @@
     PRIMARY KEY (template_code)
 ) TYPE=InnoDB;
 
-CREATE TABLE dtb_table_comment
-(
-    id int ,
+CREATE TABLE dtb_table_comment (
+    id int,
     table_name text,
     column_name text,
     description text,
@@ -866,7 +864,7 @@
 ) TYPE=InnoDB;
 
 CREATE TABLE dtb_maker (
-    maker_id int ,
+    maker_id int NOT NULL,
     name text NOT NULL,
     rank int NOT NULL DEFAULT 0,
     creator_id int NOT NULL,
@@ -1158,16 +1156,16 @@
 ) TYPE=InnoDB;
 
 CREATE TABLE mtb_product_type (
-    id int2,
+    id smallint,
     name text,
-    rank int2 NOT NULL,
+    rank smallint NOT NULL,
     PRIMARY KEY (id)
 ) TYPE=InnoDB;
 
 CREATE TABLE mtb_device_type (
-    id int2,
+    id smallint,
     name text,
-    rank int2 NOT NULL,
+    rank smallint NOT NULL,
     PRIMARY KEY (id)
 ) TYPE=InnoDB;
 
@@ -1196,7 +1194,7 @@
     sub_data text,
     auto_update_flg smallint NOT NULL DEFAULT 0,
     del_flg smallint NOT NULL DEFAULT 0,
-    create_date datetime NOT NULL ,
+    create_date datetime NOT NULL,
     update_date datetime NOT NULL
 ) TYPE=InnoDB;
 
@@ -1209,26 +1207,26 @@
 ) TYPE=InnoDB;
 
 CREATE TABLE dtb_site_control (
-    control_id int  NOT NULL,
-    control_title varchar(255) ,
-    control_text text ,
-    control_flg int NOT NULL DEFAULT 2,
-    del_flg int NOT NULL DEFAULT 0,
-    memo text ,
+    control_id int NOT NULL,
+    control_title varchar(255),
+    control_text text,
+    control_flg smallint NOT NULL DEFAULT 2,
+    del_flg smallint NOT NULL DEFAULT 0,
+    memo text,
     create_date datetime NOT NULL,
     update_date datetime NOT NULL,
-    PRIMARY KEY  (control_id)
+    PRIMARY KEY (control_id)
 ) TYPE=InnoDB;
 
 CREATE TABLE dtb_trackback (
     trackback_id int  NOT NULL,
     product_id int NOT NULL,
-    blog_name varchar(255) NOT NULL DEFAULT '',
-    title varchar(255) NOT NULL DEFAULT '',
-    excerpt text NOT NULL ,
-    url text NOT NULL ,
-    status int NOT NULL DEFAULT 2,
-    del_flg int NOT NULL DEFAULT 0,
+    blog_name varchar(255) NOT NULL,
+    title varchar(255) NOT NULL,
+    excerpt text NOT NULL,
+    url text NOT NULL,
+    status smallint NOT NULL DEFAULT 2,
+    del_flg smallint NOT NULL DEFAULT 0,
     create_date datetime NOT NULL,
     update_date datetime NOT NULL,
     PRIMARY KEY (trackback_id)
@@ -1243,10 +1241,10 @@
 
 CREATE TABLE dtb_plugin (
     plugin_id int NOT NULL,
-    plugin_name varchar(255) NOT NULL DEFAULT '',
-    enable int2 NOT NULL DEFAULT 0,
-    del_flg int2 NOT NULL DEFAULT 0,
-    class_name varchar(255) NOT NULL DEFAULT '',
+    plugin_name varchar(255) NOT NULL,
+    enable smallint NOT NULL DEFAULT 0,
+    del_flg smallint NOT NULL DEFAULT 0,
+    class_name varchar(255) NOT NULL,
     create_date datetime NOT NULL,
     update_date datetime NOT NULL,
     PRIMARY KEY (plugin_id)
@@ -1267,7 +1265,7 @@
 CREATE TABLE dtb_index_list (
     table_name varchar(30) NOT NULL DEFAULT '',
     column_name varchar(30) NOT NULL DEFAULT '',
-    recommend_flg int2 NOT NULL DEFAULT 0,
+    recommend_flg smallint NOT NULL DEFAULT 0,
     recommend_comment text,
     PRIMARY KEY (table_name, column_name)
 ) TYPE=InnoDB;

変更: branches/version-2_5-dev/html/install/sql/create_table_pgsql.sql
===================================================================
--- branches/version-2_5-dev/html/install/sql/create_table_pgsql.sql	2010-12-16 17:13:36 UTC (rev 19735)
+++ branches/version-2_5-dev/html/install/sql/create_table_pgsql.sql	2010-12-16 18:22:08 UTC (rev 19736)
@@ -849,7 +849,7 @@
     PRIMARY KEY (sql_id)
 );
 
-create table dtb_templates (
+CREATE TABLE dtb_templates (
     template_code text NOT NULL,
     template_name text,
     create_date timestamp NOT NULL DEFAULT now(),
@@ -857,7 +857,7 @@
     PRIMARY KEY (template_code)
 );
 
-create table dtb_table_comment (
+CREATE TABLE dtb_table_comment (
     id int,
     table_name text,
     column_name text,
@@ -1157,16 +1157,16 @@
 );
 
 CREATE TABLE mtb_product_type (
-    id int2,
+    id smallint,
     name text,
-    rank int2 NOT NULL,
+    rank smallint NOT NULL,
     PRIMARY KEY (id)
 );
 
 CREATE TABLE mtb_device_type (
-    id int2,
+    id smallint,
     name text,
-    rank int2 NOT NULL,
+    rank smallint NOT NULL,
     PRIMARY KEY (id)
 );
 
@@ -1188,56 +1188,69 @@
     receive_date timestamp
 );
 
-CREATE TABLE dtb_session (
-    sess_id text NOT NULL,
-    sess_data text,
-    create_date timestamp NOT NULL,
-    update_date timestamp NOT NULL,
-    PRIMARY KEY (sess_id)
-);
-
 CREATE TABLE dtb_module (
     module_id int NOT NULL UNIQUE,
     module_code text NOT NULL,
     module_name text NOT NULL,
     sub_data text,
-    auto_update_flg int2 NOT NULL DEFAULT 0,
-    del_flg int2 NOT NULL DEFAULT 0,
+    auto_update_flg smallint NOT NULL DEFAULT 0,
+    del_flg smallint NOT NULL DEFAULT 0,
     create_date timestamp NOT NULL DEFAULT NOW(),
     update_date timestamp NOT NULL
 );
 
+CREATE TABLE dtb_session (
+    sess_id text NOT NULL,
+    sess_data text,
+    create_date timestamp NOT NULL,
+    update_date timestamp NOT NULL,
+    PRIMARY KEY (sess_id)
+);
+
 CREATE TABLE dtb_site_control (
-    control_id int primary key NOT NULL,
-    control_title text ,
-    control_text text ,
-    control_flg int2 NOT NULL DEFAULT 2,
-    del_flg int2 NOT NULL DEFAULT 0,
-    memo text ,
+    control_id int NOT NULL,
+    control_title text,
+    control_text text,
+    control_flg smallint NOT NULL DEFAULT 2,
+    del_flg smallint NOT NULL DEFAULT 0,
+    memo text,
     create_date timestamp NOT NULL DEFAULT now(),
-    update_date timestamp NOT NULL DEFAULT now()
+    update_date timestamp NOT NULL DEFAULT now(),
+    PRIMARY KEY (control_id)
 );
 
 CREATE TABLE dtb_trackback (
-    trackback_id int primary key NOT NULL,
+    trackback_id int NOT NULL,
     product_id int NOT NULL,
-    blog_name varchar(255) NOT NULL DEFAULT '',
-    title varchar(255) NOT NULL DEFAULT '',
-    excerpt text NOT NULL DEFAULT '',
-    url text NOT NULL DEFAULT '',
-    status int2 NOT NULL DEFAULT 2,
-    del_flg int2 NOT NULL DEFAULT 0,
+    blog_name text NOT NULL,
+    title text NOT NULL,
+    excerpt text NOT NULL,
+    url text NOT NULL,
+    status smallint NOT NULL DEFAULT 2,
+    del_flg smallint NOT NULL DEFAULT 0,
     create_date timestamp NOT NULL,
-    update_date timestamp NOT NULL
+    update_date timestamp NOT NULL,
+    PRIMARY KEY (trackback_id)
 );
 
 CREATE TABLE dtb_bkup (
-    bkup_name   varchar(50),
+    bkup_name   text,
     bkup_memo   text,
     create_date timestamp,
     PRIMARY KEY (bkup_name)
 );
 
+CREATE TABLE dtb_plugin (
+    plugin_id int NOT NULL,
+    plugin_name text NOT NULL,
+    enable smallint NOT NULL DEFAULT 0,
+    del_flg smallint NOT NULL DEFAULT 0,
+    class_name text NOT NULL,
+    create_date timestamp NOT NULL DEFAULT now(),
+    update_date timestamp NOT NULL DEFAULT now(),
+    PRIMARY KEY (plugin_id)
+);
+
 CREATE INDEX dtb_customer_mobile_phone_id_key ON dtb_customer (mobile_phone_id);
 CREATE INDEX dtb_products_class_product_id_key ON dtb_products_class(product_id);
 CREATE INDEX dtb_order_detail_product_id_key ON dtb_order_detail(product_id);
@@ -1252,21 +1265,10 @@
 CREATE INDEX dtb_mobile_kara_mail_create_date_key ON dtb_mobile_kara_mail (create_date);
 CREATE INDEX dtb_mobile_kara_mail_receive_date_key ON dtb_mobile_kara_mail (receive_date);
 
-CREATE TABLE dtb_plugin (
-    plugin_id int NOT NULL,
-    plugin_name varchar(255) DEFAULT NULL,
-    enable int2 NOT NULL DEFAULT 0,
-    del_flg int2 NOT NULL DEFAULT 0,
-    class_name varchar(255) DEFAULT NULL,
-    create_date timestamp NOT NULL DEFAULT now(),
-    update_date timestamp NOT NULL DEFAULT now(),
-    PRIMARY KEY (plugin_id)
-);
-
 CREATE TABLE dtb_index_list (
-    table_name varchar(30) NOT NULL DEFAULT '',
-    column_name varchar(30) NOT NULL DEFAULT '',
-    recommend_flg int2 NOT NULL DEFAULT 0,
+    table_name text NOT NULL DEFAULT '',
+    column_name text NOT NULL DEFAULT '',
+    recommend_flg smallint NOT NULL DEFAULT 0,
     recommend_comment text,
     PRIMARY KEY (table_name, column_name)
 );




Svn-src-all メーリングリストの案内