Ignore:
Timestamp:
2011/01/02 00:17:14 (13 years ago)
Author:
Seasoft
Message:

#869(create_date, update_date 列の定義が、表やDBによるバラツキがある)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/html/install/sql/create_table_mysql.sql

    r19781 r19808  
    66    error text, 
    77    ok text, 
    8     create_date datetime NOT NULL, 
    9     update_date datetime NOT NULL, 
     8    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     9    update_date timestamp NOT NULL, 
    1010    PRIMARY KEY (log_id) 
    1111) TYPE=InnoDB; 
     
    2121    rank int NOT NULL DEFAULT 0, 
    2222    creator_id int NOT NULL, 
    23     create_date datetime NOT NULL, 
    24     update_date datetime NOT NULL, 
     23    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     24    update_date timestamp NOT NULL, 
    2525    del_flg smallint NOT NULL DEFAULT 0, 
    2626    PRIMARY KEY (kiyaku_id) 
     
    3434    rank int NOT NULL DEFAULT 0, 
    3535    creator_id int NOT NULL, 
    36     create_date datetime NOT NULL, 
    37     update_date datetime NOT NULL, 
     36    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     37    update_date timestamp NOT NULL, 
    3838    del_flg smallint NOT NULL DEFAULT 0, 
    3939    PRIMARY KEY (holiday_id) 
     
    6666    member smallint, 
    6767    order_date datetime, 
    68     create_date datetime NOT NULL 
     68    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP 
    6969) TYPE=InnoDB; 
    7070 
     
    8181    other_files text, 
    8282    del_flg smallint NOT NULL DEFAULT 0, 
    83     create_date datetime NOT NULL, 
    84     update_date datetime, 
     83    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     84    update_date timestamp NOT NULL, 
    8585    release_date datetime NOT NULL, 
    8686    PRIMARY KEY (module_id) 
     
    140140    point_rate numeric NOT NULL DEFAULT 0, 
    141141    welcome_point numeric NOT NULL DEFAULT 0, 
    142     update_date datetime, 
     142    update_date timestamp NOT NULL, 
    143143    top_tpl text, 
    144144    product_tpl text, 
     
    164164    del_flg smallint NOT NULL DEFAULT 0, 
    165165    creator_id int NOT NULL, 
    166     create_date datetime NOT NULL, 
    167     update_date datetime, 
     166    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     167    update_date timestamp NOT NULL, 
    168168    PRIMARY KEY (deliv_id) 
    169169) TYPE=InnoDB; 
     
    195195    del_flg smallint NOT NULL DEFAULT 0, 
    196196    creator_id int NOT NULL, 
    197     create_date datetime NOT NULL, 
    198     update_date datetime, 
     197    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     198    update_date timestamp NOT NULL, 
    199199    payment_image text, 
    200200    upper_rule numeric, 
     
    231231    creator_id int NOT NULL, 
    232232    del_flg smallint NOT NULL DEFAULT 0, 
    233     create_date datetime NOT NULL, 
    234     update_date datetime NOT NULL 
     233    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     234    update_date timestamp NOT NULL 
    235235) TYPE=InnoDB; 
    236236 
     
    247247    del_flg smallint NOT NULL DEFAULT 0, 
    248248    creator_id int NOT NULL, 
    249     create_date datetime NOT NULL, 
    250     update_date datetime NOT NULL, 
     249    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     250    update_date timestamp NOT NULL, 
    251251    PRIMARY KEY (send_id) 
    252252) TYPE=InnoDB; 
     
    304304    del_flg smallint NOT NULL DEFAULT 0, 
    305305    creator_id int NOT NULL, 
    306     create_date datetime NOT NULL, 
    307     update_date datetime, 
     306    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     307    update_date timestamp NOT NULL, 
    308308    deliv_date_id int, 
    309309    PRIMARY KEY (product_id) 
     
    324324    point_rate numeric, 
    325325    creator_id int NOT NULL, 
    326     create_date datetime NOT NULL, 
    327     update_date datetime, 
     326    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     327    update_date timestamp NOT NULL, 
    328328    down_filename text, 
    329329    down_realfilename text, 
     
    337337    rank int, 
    338338    creator_id int NOT NULL, 
    339     create_date datetime NOT NULL, 
    340     update_date datetime, 
     339    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     340    update_date timestamp NOT NULL, 
    341341    del_flg smallint NOT NULL DEFAULT 0, 
    342342    PRIMARY KEY (class_id) 
     
    349349    rank int, 
    350350    creator_id int NOT NULL, 
    351     create_date datetime NOT NULL, 
    352     update_date datetime, 
     351    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     352    update_date timestamp NOT NULL, 
    353353    del_flg smallint NOT NULL DEFAULT 0, 
    354354    PRIMARY KEY (classcategory_id) 
     
    370370    rank int, 
    371371    creator_id int NOT NULL, 
    372     create_date datetime NOT NULL, 
    373     update_date datetime, 
     372    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     373    update_date timestamp NOT NULL, 
    374374    del_flg smallint NOT NULL DEFAULT 0, 
    375375    PRIMARY KEY (category_id) 
     
    387387    product_id int NOT NULL, 
    388388    creator_id int NOT NULL, 
    389     create_date datetime NOT NULL, 
    390     update_date datetime, 
     389    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     390    update_date timestamp NOT NULL, 
    391391    del_flg smallint NOT NULL DEFAULT 0, 
    392392    PRIMARY KEY(product_status_id, product_id) 
     
    406406    total_average numeric NOT NULL DEFAULT 0, 
    407407    order_date datetime NOT NULL, 
    408     create_date datetime NOT NULL, 
     408    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    409409    year smallint NOT NULL, 
    410410    month smallint NOT NULL, 
     
    431431    hour smallint NOT NULL DEFAULT 0, 
    432432    order_date datetime, 
    433     create_date datetime NOT NULL 
     433    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP 
    434434) TYPE=InnoDB; 
    435435 
     
    441441    status smallint NOT NULL DEFAULT 0, 
    442442    creator_id int NOT NULL, 
    443     create_date datetime NOT NULL, 
    444     update_date datetime NOT NULL 
     443    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     444    update_date timestamp NOT NULL 
    445445) TYPE=InnoDB; 
    446446 
     
    457457    status smallint DEFAULT 2, 
    458458    creator_id int NOT NULL, 
    459     create_date datetime, 
    460     update_date datetime, 
     459    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     460    update_date timestamp NOT NULL, 
    461461    del_flg smallint NOT NULL DEFAULT 0, 
    462462    PRIMARY KEY (review_id) 
     
    466466    customer_id int NOT NULL, 
    467467    product_id int NOT NULL, 
    468     create_date datetime NOT NULL, 
    469     update_date datetime NOT NULL 
     468    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     469    update_date timestamp NOT NULL 
    470470) TYPE=InnoDB; 
    471471 
     
    473473    category_id int NOT NULL, 
    474474    product_count int NOT NULL, 
    475     create_date datetime NOT NULL 
     475    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP 
    476476) TYPE=InnoDB; 
    477477 
     
    479479    category_id int NOT NULL, 
    480480    product_count int, 
    481     create_date datetime NOT NULL 
     481    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP 
    482482) TYPE=InnoDB; 
    483483 
     
    492492    link_method text, 
    493493    creator_id int NOT NULL, 
    494     create_date datetime NOT NULL, 
    495     update_date datetime, 
     494    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     495    update_date timestamp NOT NULL, 
    496496    del_flg smallint NOT NULL DEFAULT 0, 
    497497    PRIMARY KEY (news_id) 
     
    506506    comment text, 
    507507    creator_id int NOT NULL, 
    508     create_date datetime NOT NULL, 
    509     update_date datetime, 
     508    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     509    update_date timestamp NOT NULL, 
    510510    del_flg smallint NOT NULL DEFAULT 0, 
    511511    PRIMARY KEY (best_id) 
     
    556556    note text, 
    557557    status smallint NOT NULL DEFAULT 1, 
    558     create_date datetime NOT NULL, 
    559     update_date datetime, 
     558    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     559    update_date timestamp NOT NULL, 
    560560    del_flg smallint NOT NULL DEFAULT 0, 
    561561    mobile_phone_id text, 
     
    621621    note text, 
    622622    status smallint, 
    623     create_date datetime NOT NULL, 
    624     update_date datetime, 
     623    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     624    update_date timestamp NOT NULL, 
    625625    commit_date datetime, 
    626626    payment_date datetime, 
     
    700700    deliv_check smallint, 
    701701    point_check smallint, 
    702     create_date datetime NOT NULL, 
    703     update_date datetime, 
     702    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     703    update_date timestamp NOT NULL, 
    704704    device_type_id int, 
    705705    del_flg smallint NOT NULL DEFAULT 0, 
     
    761761    del_flg smallint NOT NULL DEFAULT 0, 
    762762    creator_id int NOT NULL, 
    763     update_date datetime, 
    764     create_date datetime NOT NULL, 
     763    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     764    update_date timestamp NOT NULL, 
    765765    login_date datetime, 
    766766    PRIMARY KEY (member_id) 
     
    771771    relate_product_id int, 
    772772    customer_id int, 
    773     create_date datetime 
     773    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP 
    774774) TYPE=InnoDB; 
    775775 
     
    789789    keyword text, 
    790790    update_url text, 
    791     create_date datetime NOT NULL, 
    792     update_date datetime NOT NULL, 
     791    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     792    update_date timestamp NOT NULL, 
    793793    PRIMARY KEY (device_type_id, page_id) 
    794794) TYPE=InnoDB; 
     
    800800    tpl_path text, 
    801801    filename varchar(50) NOT NULL, 
    802     create_date datetime NOT NULL, 
    803     update_date datetime NOT NULL, 
     802    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     803    update_date timestamp NOT NULL, 
    804804    php_path text, 
    805805    deletable_flg smallint NOT NULL DEFAULT 1, 
     
    826826    rw_flg smallint DEFAULT 1, 
    827827    status smallint NOT NULL DEFAULT 1, 
    828     create_date datetime NOT NULL, 
    829     update_date datetime NOT NULL, 
     828    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     829    update_date timestamp NOT NULL, 
    830830    mb_convert_kana_option text, 
    831831    size_const_type text, 
     
    838838    sql_name text NOT NULL, 
    839839    csv_sql text, 
    840     update_date datetime NOT NULL, 
    841     create_date datetime NOT NULL, 
     840    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     841    update_date timestamp NOT NULL, 
    842842    PRIMARY KEY (sql_id) 
    843843) TYPE=InnoDB; 
     
    846846    template_code varchar(50) NOT NULL, 
    847847    template_name text, 
    848     create_date datetime NOT NULL, 
    849     update_date datetime NOT NULL, 
     848    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     849    update_date timestamp NOT NULL, 
    850850    PRIMARY KEY (template_code) 
    851851) TYPE=InnoDB; 
     
    864864    rank int NOT NULL DEFAULT 0, 
    865865    creator_id int NOT NULL, 
    866     create_date datetime NOT NULL, 
    867     update_date datetime NOT NULL, 
     866    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     867    update_date timestamp NOT NULL, 
    868868    del_flg smallint NOT NULL DEFAULT 0, 
    869869    PRIMARY KEY (maker_id) 
     
    873873    maker_id int NOT NULL, 
    874874    product_count int NOT NULL, 
    875     create_date datetime NOT NULL 
     875    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP 
    876876) TYPE=InnoDB; 
    877877 
     
    11961196    auto_update_flg smallint NOT NULL DEFAULT 0, 
    11971197    del_flg smallint NOT NULL DEFAULT 0, 
    1198     create_date datetime NOT NULL, 
    1199     update_date datetime NOT NULL 
     1198    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     1199    update_date timestamp NOT NULL 
    12001200) TYPE=InnoDB; 
    12011201 
     
    12031203    sess_id varchar(50) NOT NULL, 
    12041204    sess_data text, 
    1205     create_date datetime NOT NULL, 
    1206     update_date datetime NOT NULL, 
     1205    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     1206    update_date timestamp NOT NULL, 
    12071207    PRIMARY KEY (sess_id) 
    12081208) TYPE=InnoDB; 
     
    12151215    del_flg smallint NOT NULL DEFAULT 0, 
    12161216    memo text, 
    1217     create_date datetime NOT NULL, 
    1218     update_date datetime NOT NULL, 
     1217    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     1218    update_date timestamp NOT NULL, 
    12191219    PRIMARY KEY (control_id) 
    12201220) TYPE=InnoDB; 
     
    12291229    status smallint NOT NULL DEFAULT 2, 
    12301230    del_flg smallint NOT NULL DEFAULT 0, 
    1231     create_date datetime NOT NULL, 
    1232     update_date datetime NOT NULL, 
     1231    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     1232    update_date timestamp NOT NULL, 
    12331233    PRIMARY KEY (trackback_id) 
    12341234) TYPE=InnoDB; 
     
    12371237    bkup_name varchar(50), 
    12381238    bkup_memo text, 
    1239     create_date datetime, 
     1239    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    12401240    PRIMARY KEY (bkup_name) 
    12411241) TYPE=InnoDB; 
     
    12471247    del_flg smallint NOT NULL DEFAULT 0, 
    12481248    class_name varchar(255) NOT NULL, 
    1249     create_date datetime NOT NULL, 
    1250     update_date datetime NOT NULL, 
     1249    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     1250    update_date timestamp NOT NULL, 
    12511251    PRIMARY KEY (plugin_id) 
    12521252) TYPE=InnoDB; 
Note: See TracChangeset for help on using the changeset viewer.