mirror of https://github.com/sipwise/db-schema.git
Change kamailio.location expires and last_modified columns
from datetime to bigint
Change-Id: I2baa7134fe84960f07efda1e621cf0508345e1b1
(cherry picked from commit 6618e9be0c
)
changes/01/32701/1
parent
06edab48de
commit
bd00662f77
@ -0,0 +1,15 @@
|
||||
set sql_log_bin=0;
|
||||
set autocommit=0;
|
||||
|
||||
use kamailio;
|
||||
|
||||
ALTER TABLE location CHANGE expires expires_old datetime;
|
||||
ALTER TABLE location CHANGE last_modified last_modified_old datetime;
|
||||
ALTER TABLE location ADD expires datetime NOT NULL DEFAULT '2030-05-28 21:32:15';
|
||||
ALTER TABLE location ADD last_modified datetime NOT NULL DEFAULT '1900-01-01 00:00:01';
|
||||
UPDATE location SET expires=FROM_UNIXTIME(expires_old);
|
||||
UPDATE location SET last_modified=FROM_UNIXTIME(last_modified_old);
|
||||
ALTER TABLE location DROP expires_old;
|
||||
ALTER TABLE location DROP last_modified_old;
|
||||
|
||||
commit;
|
@ -0,0 +1,15 @@
|
||||
set sql_log_bin=0;
|
||||
set autocommit=0;
|
||||
|
||||
use kamailio;
|
||||
|
||||
ALTER TABLE location CHANGE expires expires_old datetime;
|
||||
ALTER TABLE location CHANGE last_modified last_modified_old datetime;
|
||||
ALTER TABLE location ADD expires BIGINT NOT NULL DEFAULT 2000000000;
|
||||
ALTER TABLE location ADD last_modified BIGINT NOT NULL DEFAULT 1;
|
||||
UPDATE location SET expires=UNIX_TIMESTAMP(expires_old);
|
||||
UPDATE location SET last_modified=UNIX_TIMESTAMP(last_modified_old);
|
||||
ALTER TABLE location DROP expires_old;
|
||||
ALTER TABLE location DROP last_modified_old;
|
||||
|
||||
commit;
|
Loading…
Reference in new issue