Index: /branches/version-2_5-dev/html/install/sql/create_table_mysql.sql
===================================================================
--- /branches/version-2_5-dev/html/install/sql/create_table_mysql.sql	(revision 19733)
+++ /branches/version-2_5-dev/html/install/sql/create_table_mysql.sql	(revision 19736)
@@ -315,5 +315,5 @@
     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,
@@ -822,10 +822,10 @@
     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,
@@ -840,5 +840,5 @@
 
 CREATE TABLE dtb_csv_sql (
-    sql_id int ,
+    sql_id int,
     sql_name text NOT NULL,
     csv_sql text,
@@ -848,6 +848,5 @@
 ) TYPE=InnoDB;
 
-CREATE TABLE dtb_templates
-(
+CREATE TABLE dtb_templates (
     template_code varchar(50) NOT NULL,
     template_name text,
@@ -857,7 +856,6 @@
 ) TYPE=InnoDB;
 
-CREATE TABLE dtb_table_comment
-(
-    id int ,
+CREATE TABLE dtb_table_comment (
+    id int,
     table_name text,
     column_name text,
@@ -867,5 +865,5 @@
 
 CREATE TABLE dtb_maker (
-    maker_id int ,
+    maker_id int NOT NULL,
     name text NOT NULL,
     rank int NOT NULL DEFAULT 0,
@@ -1159,14 +1157,14 @@
 
 CREATE TABLE mtb_product_type (
-    id int2,
-    name text,
-    rank int2 NOT NULL,
+    id smallint,
+    name text,
+    rank smallint NOT NULL,
     PRIMARY KEY (id)
 ) TYPE=InnoDB;
 
 CREATE TABLE mtb_device_type (
-    id int2,
-    name text,
-    rank int2 NOT NULL,
+    id smallint,
+    name text,
+    rank smallint NOT NULL,
     PRIMARY KEY (id)
 ) TYPE=InnoDB;
@@ -1197,5 +1195,5 @@
     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;
@@ -1210,13 +1208,13 @@
 
 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 ,
-    create_date datetime NOT NULL,
-    update_date datetime NOT NULL,
-    PRIMARY KEY  (control_id)
+    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)
 ) TYPE=InnoDB;
 
@@ -1224,10 +1222,10 @@
     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,
@@ -1244,8 +1242,8 @@
 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,
@@ -1268,5 +1266,5 @@
     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)
Index: /branches/version-2_5-dev/html/install/sql/create_table_pgsql.sql
===================================================================
--- /branches/version-2_5-dev/html/install/sql/create_table_pgsql.sql	(revision 19733)
+++ /branches/version-2_5-dev/html/install/sql/create_table_pgsql.sql	(revision 19736)
@@ -850,5 +850,5 @@
 );
 
-create table dtb_templates (
+CREATE TABLE dtb_templates (
     template_code text NOT NULL,
     template_name text,
@@ -858,5 +858,5 @@
 );
 
-create table dtb_table_comment (
+CREATE TABLE dtb_table_comment (
     id int,
     table_name text,
@@ -1158,14 +1158,14 @@
 
 CREATE TABLE mtb_product_type (
-    id int2,
-    name text,
-    rank int2 NOT NULL,
+    id smallint,
+    name text,
+    rank smallint NOT NULL,
     PRIMARY KEY (id)
 );
 
 CREATE TABLE mtb_device_type (
-    id int2,
-    name text,
-    rank int2 NOT NULL,
+    id smallint,
+    name text,
+    rank smallint NOT NULL,
     PRIMARY KEY (id)
 );
@@ -1189,4 +1189,15 @@
 );
 
+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 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,
@@ -1197,44 +1208,46 @@
 );
 
-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,
-    create_date timestamp NOT NULL DEFAULT NOW(),
-    update_date timestamp NOT NULL
-);
-
 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 ,
-    create_date timestamp NOT NULL DEFAULT now(),
-    update_date timestamp NOT NULL DEFAULT now()
+    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(),
+    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)
 );
 
@@ -1253,19 +1266,8 @@
 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)
