Changeset 22280


Ignore:
Timestamp:
2013/01/18 18:19:12 (11 years ago)
Author:
m_uehara
Message:

#2034 DBのタイムゾーンの設定

Location:
branches/version-2_12-multilang
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-multilang/data/class/db/dbfactory/SC_DB_DBFactory_MYSQL.php

    r21867 r22280  
    323323        $objQuery->exec('SET SESSION storage_engine = InnoDB'); 
    324324        $objQuery->exec("SET SESSION sql_mode = 'ANSI'"); 
     325        $objQuery->exec("SET TIME_ZONE = '+9:00'"); 
    325326    } 
    326327} 
  • branches/version-2_12-multilang/html/install/sql/create_table_pgsql.sql

    r22205 r22280  
    66    error text, 
    77    ok text, 
    8     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    9     update_date timestamp NOT NULL, 
     8    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     9    update_date timestamp WITH TIME ZONE NOT NULL, 
    1010    PRIMARY KEY (log_id) 
    1111); 
     
    2222    rank int NOT NULL DEFAULT 0, 
    2323    creator_id int NOT NULL, 
    24     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    25     update_date timestamp NOT NULL, 
     24    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     25    update_date timestamp WITH TIME ZONE NOT NULL, 
    2626    del_flg smallint NOT NULL DEFAULT 0, 
    2727    PRIMARY KEY (kiyaku_id) 
     
    3535    rank int NOT NULL DEFAULT 0, 
    3636    creator_id int NOT NULL, 
    37     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    38     update_date timestamp NOT NULL, 
     37    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     38    update_date timestamp WITH TIME ZONE NOT NULL, 
    3939    del_flg smallint NOT NULL DEFAULT 0, 
    4040    PRIMARY KEY (holiday_id) 
     
    6262    other_files text, 
    6363    del_flg smallint NOT NULL DEFAULT 0, 
    64     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    65     update_date timestamp NOT NULL, 
    66     release_date timestamp NOT NULL, 
     64    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     65    update_date timestamp WITH TIME ZONE NOT NULL, 
     66    release_date timestamp WITH TIME ZONE NOT NULL, 
    6767    PRIMARY KEY (module_id) 
    6868); 
     
    124124    point_rate numeric NOT NULL DEFAULT 0, 
    125125    welcome_point numeric NOT NULL DEFAULT 0, 
    126     update_date timestamp NOT NULL, 
     126    update_date timestamp WITH TIME ZONE NOT NULL, 
    127127    top_tpl text, 
    128128    product_tpl text, 
     
    150150    del_flg smallint NOT NULL DEFAULT 0, 
    151151    creator_id int NOT NULL, 
    152     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    153     update_date timestamp NOT NULL, 
     152    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     153    update_date timestamp WITH TIME ZONE NOT NULL, 
    154154    PRIMARY KEY (deliv_id) 
    155155); 
     
    188188    del_flg smallint NOT NULL DEFAULT 0, 
    189189    creator_id int NOT NULL, 
    190     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    191     update_date timestamp NOT NULL, 
     190    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     191    update_date timestamp WITH TIME ZONE NOT NULL, 
    192192    payment_image text, 
    193193    upper_rule numeric, 
     
    217217    creator_id int NOT NULL, 
    218218    del_flg smallint NOT NULL DEFAULT 0, 
    219     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    220     update_date timestamp NOT NULL, 
     219    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     220    update_date timestamp WITH TIME ZONE NOT NULL, 
    221221    PRIMARY KEY (template_id) 
    222222); 
     
    229229    del_flg smallint NOT NULL DEFAULT 0, 
    230230    creator_id int NOT NULL, 
    231     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    232     update_date timestamp NOT NULL, 
     231    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     232    update_date timestamp WITH TIME ZONE NOT NULL, 
    233233    PRIMARY KEY (template_id) 
    234234); 
     
    241241    send_count int, 
    242242    complete_count int NOT NULL DEFAULT 0, 
    243     start_date timestamp, 
    244     end_date timestamp, 
     243    start_date timestamp WITH TIME ZONE, 
     244    end_date timestamp WITH TIME ZONE, 
    245245    search_data text, 
    246246    del_flg smallint NOT NULL DEFAULT 0, 
    247247    creator_id int NOT NULL, 
    248     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    249     update_date timestamp NOT NULL, 
     248    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     249    update_date timestamp WITH TIME ZONE NOT NULL, 
    250250    PRIMARY KEY (send_id) 
    251251); 
     
    303303    del_flg smallint NOT NULL DEFAULT 0, 
    304304    creator_id int NOT NULL, 
    305     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    306     update_date timestamp NOT NULL, 
     305    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     306    update_date timestamp WITH TIME ZONE NOT NULL, 
    307307    deliv_date_id int, 
    308308    PRIMARY KEY (product_id) 
     
    324324    point_rate numeric NOT NULL DEFAULT 0, 
    325325    creator_id int NOT NULL, 
    326     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    327     update_date timestamp NOT NULL, 
     326    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     327    update_date timestamp WITH TIME ZONE NOT NULL, 
    328328    down_filename text, 
    329329    down_realfilename text, 
     
    338338    rank int, 
    339339    creator_id int NOT NULL, 
    340     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    341     update_date timestamp NOT NULL, 
     340    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     341    update_date timestamp WITH TIME ZONE NOT NULL, 
    342342    del_flg smallint NOT NULL DEFAULT 0, 
    343343    PRIMARY KEY (class_id) 
     
    350350    rank int, 
    351351    creator_id int NOT NULL, 
    352     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    353     update_date timestamp NOT NULL, 
     352    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     353    update_date timestamp WITH TIME ZONE NOT NULL, 
    354354    del_flg smallint NOT NULL DEFAULT 0, 
    355355    PRIMARY KEY (classcategory_id) 
     
    363363    rank int, 
    364364    creator_id int NOT NULL, 
    365     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    366     update_date timestamp NOT NULL, 
     365    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     366    update_date timestamp WITH TIME ZONE NOT NULL, 
    367367    del_flg smallint NOT NULL DEFAULT 0, 
    368368    PRIMARY KEY (category_id) 
     
    380380    product_id int NOT NULL, 
    381381    creator_id int NOT NULL, 
    382     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    383     update_date timestamp NOT NULL, 
     382    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     383    update_date timestamp WITH TIME ZONE NOT NULL, 
    384384    del_flg smallint NOT NULL DEFAULT 0, 
    385385    PRIMARY KEY (product_status_id, product_id) 
     
    393393    status smallint NOT NULL DEFAULT 0, 
    394394    creator_id int NOT NULL, 
    395     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    396     update_date timestamp NOT NULL, 
     395    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     396    update_date timestamp WITH TIME ZONE NOT NULL, 
    397397    PRIMARY KEY (product_id, recommend_product_id) 
    398398); 
     
    410410    status smallint DEFAULT 2, 
    411411    creator_id int NOT NULL, 
    412     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    413     update_date timestamp NOT NULL, 
     412    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     413    update_date timestamp WITH TIME ZONE NOT NULL, 
    414414    del_flg smallint NOT NULL DEFAULT 0, 
    415415    PRIMARY KEY (review_id) 
     
    419419    customer_id int NOT NULL, 
    420420    product_id int NOT NULL, 
    421     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    422     update_date timestamp NOT NULL, 
     421    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     422    update_date timestamp WITH TIME ZONE NOT NULL, 
    423423    PRIMARY KEY (customer_id, product_id) 
    424424); 
     
    427427    category_id int NOT NULL, 
    428428    product_count int NOT NULL, 
    429     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     429    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    430430    PRIMARY KEY (category_id) 
    431431); 
     
    434434    category_id int NOT NULL, 
    435435    product_count int, 
    436     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     436    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    437437    PRIMARY KEY (category_id) 
    438438); 
     
    440440CREATE TABLE dtb_news ( 
    441441    news_id int NOT NULL, 
    442     news_date timestamp, 
     442    news_date timestamp WITH TIME ZONE, 
    443443    rank int, 
    444444    news_title text NOT NULL, 
     
    448448    link_method text, 
    449449    creator_id int NOT NULL, 
    450     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    451     update_date timestamp NOT NULL, 
     450    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     451    update_date timestamp WITH TIME ZONE NOT NULL, 
    452452    del_flg smallint NOT NULL DEFAULT 0, 
    453453    PRIMARY KEY (news_id) 
     
    462462    comment text, 
    463463    creator_id int NOT NULL, 
    464     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    465     update_date timestamp NOT NULL, 
     464    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     465    update_date timestamp WITH TIME ZONE NOT NULL, 
    466466    del_flg smallint NOT NULL DEFAULT 0, 
    467467    PRIMARY KEY (best_id) 
     
    471471    send_id int NOT NULL, 
    472472    order_id int NOT NULL, 
    473     send_date timestamp, 
     473    send_date timestamp WITH TIME ZONE, 
    474474    template_id int, 
    475475    creator_id int NOT NULL, 
     
    501501    sex smallint, 
    502502    job smallint, 
    503     birth timestamp, 
     503    birth timestamp WITH TIME ZONE, 
    504504    password text, 
    505505    reminder smallint, 
     
    507507    salt text, 
    508508    secret_key text NOT NULL, 
    509     first_buy_date timestamp, 
    510     last_buy_date timestamp, 
     509    first_buy_date timestamp WITH TIME ZONE, 
     510    last_buy_date timestamp WITH TIME ZONE, 
    511511    buy_times numeric DEFAULT 0, 
    512512    buy_total numeric DEFAULT 0, 
     
    514514    note text, 
    515515    status smallint NOT NULL DEFAULT 1, 
    516     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    517     update_date timestamp NOT NULL, 
     516    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     517    update_date timestamp WITH TIME ZONE NOT NULL, 
    518518    del_flg smallint NOT NULL DEFAULT 0, 
    519519    mobile_phone_id text, 
     
    546546    order_addr02 text, 
    547547    order_sex smallint, 
    548     order_birth timestamp, 
     548    order_birth timestamp WITH TIME ZONE, 
    549549    order_job int, 
    550550    subtotal numeric, 
     
    563563    note text, 
    564564    status smallint, 
    565     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    566     update_date timestamp NOT NULL, 
    567     commit_date timestamp, 
    568     payment_date timestamp, 
     565    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     566    update_date timestamp WITH TIME ZONE NOT NULL, 
     567    commit_date timestamp WITH TIME ZONE, 
     568    payment_date timestamp WITH TIME ZONE, 
    569569    device_type_id int, 
    570570    del_flg smallint NOT NULL DEFAULT 0, 
     
    604604    order_addr02 text, 
    605605    order_sex smallint, 
    606     order_birth timestamp, 
     606    order_birth timestamp WITH TIME ZONE, 
    607607    order_job int, 
    608608    subtotal numeric, 
     
    624624    deliv_check smallint, 
    625625    point_check smallint, 
    626     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    627     update_date timestamp NOT NULL, 
     626    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     627    update_date timestamp WITH TIME ZONE NOT NULL, 
    628628    device_type_id int, 
    629629    del_flg smallint NOT NULL DEFAULT 0, 
     
    665665    shipping_time text, 
    666666    shipping_num text, 
    667     shipping_date timestamp, 
    668     shipping_commit_date timestamp, 
     667    shipping_date timestamp WITH TIME ZONE, 
     668    shipping_commit_date timestamp WITH TIME ZONE, 
    669669    rank int, 
    670     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    671     update_date timestamp NOT NULL, 
     670    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     671    update_date timestamp WITH TIME ZONE NOT NULL, 
    672672    del_flg smallint NOT NULL DEFAULT 0, 
    673673    PRIMARY KEY (shipping_id, order_id) 
     
    736736    del_flg smallint NOT NULL DEFAULT 0, 
    737737    creator_id int NOT NULL, 
    738     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    739     update_date timestamp NOT NULL, 
    740     login_date timestamp, 
     738    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     739    update_date timestamp WITH TIME ZONE NOT NULL, 
     740    login_date timestamp WITH TIME ZONE, 
    741741    PRIMARY KEY (member_id) 
    742742); 
     
    755755    keyword text, 
    756756    update_url text, 
    757     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    758     update_date timestamp NOT NULL, 
     757    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     758    update_date timestamp WITH TIME ZONE NOT NULL, 
    759759    PRIMARY KEY (device_type_id, page_id) 
    760760); 
     
    766766    tpl_path text, 
    767767    filename text NOT NULL, 
    768     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    769     update_date timestamp NOT NULL, 
     768    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     769    update_date timestamp WITH TIME ZONE NOT NULL, 
    770770    php_path text, 
    771771    deletable_flg smallint NOT NULL DEFAULT 1, 
     
    793793    rw_flg smallint DEFAULT 1, 
    794794    status smallint NOT NULL DEFAULT 1, 
    795     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    796     update_date timestamp NOT NULL, 
     795    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     796    update_date timestamp WITH TIME ZONE NOT NULL, 
    797797    mb_convert_kana_option text, 
    798798    size_const_type text, 
     
    805805    sql_name text NOT NULL, 
    806806    csv_sql text, 
    807     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    808     update_date timestamp NOT NULL, 
     807    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     808    update_date timestamp WITH TIME ZONE NOT NULL, 
    809809    PRIMARY KEY (sql_id) 
    810810); 
     
    814814    device_type_id int NOT NULL, 
    815815    template_name text, 
    816     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    817     update_date timestamp NOT NULL, 
     816    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     817    update_date timestamp WITH TIME ZONE NOT NULL, 
    818818    PRIMARY KEY (template_code) 
    819819); 
     
    824824    rank int NOT NULL DEFAULT 0, 
    825825    creator_id int NOT NULL, 
    826     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    827     update_date timestamp NOT NULL, 
     826    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     827    update_date timestamp WITH TIME ZONE NOT NULL, 
    828828    del_flg smallint NOT NULL DEFAULT 0, 
    829829    PRIMARY KEY (maker_id) 
     
    833833    maker_id int NOT NULL, 
    834834    product_count int NOT NULL, 
    835     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     835    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    836836    PRIMARY KEY (maker_id) 
    837837); 
     
    11091109    param_value text, 
    11101110    url text, 
    1111     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     1111    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    11121112    PRIMARY KEY (session_id) 
    11131113); 
     
    11201120    auto_update_flg smallint NOT NULL DEFAULT 0, 
    11211121    del_flg smallint NOT NULL DEFAULT 0, 
    1122     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    1123     update_date timestamp NOT NULL, 
     1122    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     1123    update_date timestamp WITH TIME ZONE NOT NULL, 
    11241124    PRIMARY KEY (module_id) 
    11251125); 
     
    11281128    sess_id text NOT NULL, 
    11291129    sess_data text, 
    1130     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    1131     update_date timestamp NOT NULL, 
     1130    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     1131    update_date timestamp WITH TIME ZONE NOT NULL, 
    11321132    PRIMARY KEY (sess_id) 
    11331133); 
     
    11361136    bkup_name text, 
    11371137    bkup_memo text, 
    1138     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     1138    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    11391139    PRIMARY KEY (bkup_name) 
    11401140); 
     
    11571157    free_field3 text, 
    11581158    free_field4 text, 
    1159     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    1160     update_date timestamp NOT NULL, 
     1159    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     1160    update_date timestamp WITH TIME ZONE NOT NULL, 
    11611161    PRIMARY KEY (plugin_id) 
    11621162); 
     
    11671167    hook_point text NOT NULL, 
    11681168    callback text, 
    1169     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    1170     update_date timestamp NOT NULL, 
     1169    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     1170    update_date timestamp WITH TIME ZONE NOT NULL, 
    11711171    PRIMARY KEY (plugin_hookpoint_id) 
    11721172); 
     
    11891189    sub_data text, 
    11901190    del_flg smallint NOT NULL DEFAULT 0, 
    1191     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    1192     update_date timestamp NOT NULL, 
     1191    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     1192    update_date timestamp WITH TIME ZONE NOT NULL, 
    11931193    PRIMARY KEY (api_config_id) 
    11941194); 
     
    12001200    enable smallint NOT NULL DEFAULT 0, 
    12011201    del_flg smallint NOT NULL DEFAULT 0, 
    1202     create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    1203     update_date timestamp NOT NULL, 
     1202    create_date timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 
     1203    update_date timestamp WITH TIME ZONE NOT NULL, 
    12041204    PRIMARY KEY (api_account_id) 
    12051205); 
Note: See TracChangeset for help on using the changeset viewer.