Ignore:
Timestamp:
2011/08/11 19:37:10 (13 years ago)
Author:
shutta
Message:

refs #800 (SQL標準関数を使用する)
CURRENT_TIMESTAMP を使用するように now() を置換。

Location:
branches/version-2_11-dev/html
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_11-dev/html/install/index.php

    r20970 r21185  
    551551    $sqlval['detail_tpl'] = "default1"; 
    552552    $sqlval['mypage_tpl'] = "default1"; 
    553     $sqlval['update_date'] = 'now()'; 
     553    $sqlval['update_date'] = 'CURRENT_TIMESTAMP'; 
    554554    $objQuery = new SC_Query($dsn); 
    555555    $cnt = $objQuery->count("dtb_baseinfo"); 
     
    571571        'work' => 1, 
    572572        'del_flg' => 0, 
    573         'update_date' => 'now()', 
     573        'update_date' => 'CURRENT_TIMESTAMP', 
    574574    ); 
    575575 
  • branches/version-2_11-dev/html/install/sql/create_table_pgsql.sql

    r20887 r21185  
    66    error text, 
    77    ok text, 
    8     create_date timestamp NOT NULL DEFAULT now(), 
     8    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    99    update_date timestamp NOT NULL, 
    1010    PRIMARY KEY (log_id) 
     
    2121    rank int NOT NULL DEFAULT 0, 
    2222    creator_id int NOT NULL, 
    23     create_date timestamp NOT NULL DEFAULT now(), 
     23    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    2424    update_date timestamp NOT NULL, 
    2525    del_flg smallint NOT NULL DEFAULT 0, 
     
    3434    rank int NOT NULL DEFAULT 0, 
    3535    creator_id int NOT NULL, 
    36     create_date timestamp NOT NULL DEFAULT now(), 
     36    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    3737    update_date timestamp NOT NULL, 
    3838    del_flg smallint NOT NULL DEFAULT 0, 
     
    7070    other_files text, 
    7171    del_flg smallint NOT NULL DEFAULT 0, 
    72     create_date timestamp NOT NULL DEFAULT now(), 
     72    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    7373    update_date timestamp NOT NULL, 
    7474    release_date timestamp NOT NULL, 
     
    154154    del_flg smallint NOT NULL DEFAULT 0, 
    155155    creator_id int NOT NULL, 
    156     create_date timestamp NOT NULL DEFAULT now(), 
     156    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    157157    update_date timestamp NOT NULL, 
    158158    PRIMARY KEY (deliv_id) 
     
    192192    del_flg smallint NOT NULL DEFAULT 0, 
    193193    creator_id int NOT NULL, 
    194     create_date timestamp NOT NULL DEFAULT now(), 
     194    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    195195    update_date timestamp NOT NULL, 
    196196    payment_image text, 
     
    221221    creator_id int NOT NULL, 
    222222    del_flg smallint NOT NULL DEFAULT 0, 
    223     create_date timestamp NOT NULL DEFAULT now(), 
     223    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    224224    update_date timestamp NOT NULL 
    225225); 
     
    232232    del_flg smallint NOT NULL DEFAULT 0, 
    233233    creator_id int NOT NULL, 
    234     create_date timestamp NOT NULL DEFAULT now(), 
     234    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    235235    update_date timestamp NOT NULL, 
    236236    PRIMARY KEY (template_id) 
     
    249249    del_flg smallint NOT NULL DEFAULT 0, 
    250250    creator_id int NOT NULL, 
    251     create_date timestamp NOT NULL DEFAULT now(), 
     251    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    252252    update_date timestamp NOT NULL, 
    253253    PRIMARY KEY (send_id) 
     
    306306    del_flg smallint NOT NULL DEFAULT 0, 
    307307    creator_id int NOT NULL, 
    308     create_date timestamp NOT NULL DEFAULT now(), 
     308    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    309309    update_date timestamp NOT NULL, 
    310310    deliv_date_id int, 
     
    326326    point_rate numeric, 
    327327    creator_id int NOT NULL, 
    328     create_date timestamp NOT NULL DEFAULT now(), 
     328    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    329329    update_date timestamp NOT NULL, 
    330330    down_filename text, 
     
    339339    rank int, 
    340340    creator_id int NOT NULL, 
    341     create_date timestamp NOT NULL DEFAULT now(), 
     341    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    342342    update_date timestamp NOT NULL, 
    343343    del_flg smallint NOT NULL DEFAULT 0, 
     
    351351    rank int, 
    352352    creator_id int NOT NULL, 
    353     create_date timestamp NOT NULL DEFAULT now(), 
     353    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    354354    update_date timestamp NOT NULL, 
    355355    del_flg smallint NOT NULL DEFAULT 0, 
     
    372372    rank int, 
    373373    creator_id int NOT NULL, 
    374     create_date timestamp NOT NULL DEFAULT now(), 
     374    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    375375    update_date timestamp NOT NULL, 
    376376    del_flg smallint NOT NULL DEFAULT 0, 
     
    389389    product_id int NOT NULL, 
    390390    creator_id int NOT NULL, 
    391     create_date timestamp NOT NULL DEFAULT now(), 
     391    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    392392    update_date timestamp NOT NULL, 
    393393    del_flg smallint NOT NULL DEFAULT 0, 
     
    402402    status smallint NOT NULL DEFAULT 0, 
    403403    creator_id int NOT NULL, 
    404     create_date timestamp NOT NULL DEFAULT now(), 
     404    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    405405    update_date timestamp NOT NULL 
    406406); 
     
    418418    status smallint DEFAULT 2, 
    419419    creator_id int NOT NULL, 
    420     create_date timestamp NOT NULL DEFAULT now(), 
     420    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    421421    update_date timestamp NOT NULL, 
    422422    del_flg smallint NOT NULL DEFAULT 0, 
     
    427427    customer_id int NOT NULL, 
    428428    product_id int NOT NULL, 
    429     create_date timestamp NOT NULL DEFAULT now(), 
     429    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    430430    update_date timestamp NOT NULL, 
    431431    PRIMARY KEY (customer_id, product_id) 
     
    435435    category_id int NOT NULL, 
    436436    product_count int NOT NULL, 
    437     create_date timestamp NOT NULL DEFAULT now() 
     437    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP 
    438438); 
    439439 
     
    441441    category_id int NOT NULL, 
    442442    product_count int, 
    443     create_date timestamp NOT NULL DEFAULT now() 
     443    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP 
    444444); 
    445445 
     
    454454    link_method text, 
    455455    creator_id int NOT NULL, 
    456     create_date timestamp NOT NULL DEFAULT now(), 
     456    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    457457    update_date timestamp NOT NULL, 
    458458    del_flg smallint NOT NULL DEFAULT 0, 
     
    468468    comment text, 
    469469    creator_id int NOT NULL, 
    470     create_date timestamp NOT NULL DEFAULT now(), 
     470    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    471471    update_date timestamp NOT NULL, 
    472472    del_flg smallint NOT NULL DEFAULT 0, 
     
    519519    note text, 
    520520    status smallint NOT NULL DEFAULT 1, 
    521     create_date timestamp NOT NULL DEFAULT now(), 
     521    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    522522    update_date timestamp NOT NULL, 
    523523    del_flg smallint NOT NULL DEFAULT 0, 
     
    566566    note text, 
    567567    status smallint, 
    568     create_date timestamp NOT NULL DEFAULT now(), 
     568    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    569569    update_date timestamp NOT NULL, 
    570570    commit_date timestamp, 
     
    626626    deliv_check smallint, 
    627627    point_check smallint, 
    628     create_date timestamp NOT NULL DEFAULT now(), 
     628    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    629629    update_date timestamp NOT NULL, 
    630630    device_type_id int, 
     
    669669    shipping_commit_date timestamp, 
    670670    rank int, 
    671     create_date timestamp NOT NULL DEFAULT now(), 
     671    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    672672    update_date timestamp NOT NULL, 
    673673    del_flg smallint NOT NULL DEFAULT 0, 
     
    733733    del_flg smallint NOT NULL DEFAULT 0, 
    734734    creator_id int NOT NULL, 
    735     create_date timestamp NOT NULL DEFAULT now(), 
     735    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    736736    update_date timestamp NOT NULL, 
    737737    login_date timestamp, 
     
    752752    keyword text, 
    753753    update_url text, 
    754     create_date timestamp NOT NULL DEFAULT now(), 
     754    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    755755    update_date timestamp NOT NULL, 
    756756    PRIMARY KEY (device_type_id, page_id) 
     
    763763    tpl_path text, 
    764764    filename text NOT NULL, 
    765     create_date timestamp NOT NULL DEFAULT now(), 
     765    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    766766    update_date timestamp NOT NULL, 
    767767    php_path text, 
     
    789789    rw_flg smallint DEFAULT 1, 
    790790    status smallint NOT NULL DEFAULT 1, 
    791     create_date timestamp NOT NULL DEFAULT now(), 
     791    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    792792    update_date timestamp NOT NULL, 
    793793    mb_convert_kana_option text, 
     
    801801    sql_name text NOT NULL, 
    802802    csv_sql text, 
    803     create_date timestamp NOT NULL DEFAULT now(), 
     803    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    804804    update_date timestamp NOT NULL, 
    805805    PRIMARY KEY (sql_id) 
     
    810810    device_type_id int NOT NULL, 
    811811    template_name text, 
    812     create_date timestamp NOT NULL DEFAULT now(), 
     812    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    813813    update_date timestamp NOT NULL, 
    814814    PRIMARY KEY (template_code) 
     
    820820    rank int NOT NULL DEFAULT 0, 
    821821    creator_id int NOT NULL, 
    822     create_date timestamp NOT NULL DEFAULT now(), 
     822    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    823823    update_date timestamp NOT NULL, 
    824824    del_flg smallint NOT NULL DEFAULT 0, 
     
    829829    maker_id int NOT NULL, 
    830830    product_count int NOT NULL, 
    831     create_date timestamp NOT NULL DEFAULT now() 
     831    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP 
    832832); 
    833833 
     
    11041104    param_value text, 
    11051105    url text, 
    1106     create_date timestamp NOT NULL DEFAULT now() 
     1106    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP 
    11071107); 
    11081108 
     
    11141114    auto_update_flg smallint NOT NULL DEFAULT 0, 
    11151115    del_flg smallint NOT NULL DEFAULT 0, 
    1116     create_date timestamp NOT NULL DEFAULT now(), 
     1116    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    11171117    update_date timestamp NOT NULL 
    11181118); 
     
    11211121    sess_id text NOT NULL, 
    11221122    sess_data text, 
    1123     create_date timestamp NOT NULL DEFAULT now(), 
     1123    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    11241124    update_date timestamp NOT NULL, 
    11251125    PRIMARY KEY (sess_id) 
     
    11291129    bkup_name   text, 
    11301130    bkup_memo   text, 
    1131     create_date timestamp NOT NULL DEFAULT now(), 
     1131    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    11321132    PRIMARY KEY (bkup_name) 
    11331133); 
     
    11471147    enable smallint NOT NULL DEFAULT 0, 
    11481148    del_flg smallint NOT NULL DEFAULT 0, 
    1149     create_date timestamp NOT NULL DEFAULT now(), 
     1149    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 
    11501150    update_date timestamp NOT NULL, 
    11511151    PRIMARY KEY (plugin_id) 
  • branches/version-2_11-dev/html/test/upgrade/index.php

    r20813 r21185  
    117117                'auto_update_flg' => '0', 
    118118                'del_flg' => '0', 
    119                 'update_date' => 'NOW()', 
     119                'update_date' => 'CURRENT_TIMESTAMP', 
    120120            ); 
    121121            $objQuery->update($table, $arrUpdate, $where, array($arrProduct['product_id'])); 
     
    127127                'auto_update_flg' => '0', 
    128128                'del_flg' => '0', 
    129                 'update_date' => 'NOW()', 
    130                 'create_date' => 'NOW()', 
     129                'update_date' => 'CURRENT_TIMESTAMP', 
     130                'create_date' => 'CURRENT_TIMESTAMP', 
    131131            ); 
    132132            $objQuery->insert($table, $arrInsert); 
Note: See TracChangeset for help on using the changeset viewer.