mapserver/static/sql/sqlite_mapdb_migrate.sql

13 lines
410 B
MySQL
Raw Normal View History

2019-02-13 16:47:32 +03:00
alter table blocks add mtime integer default 0;
create index blocks_mtime on blocks(mtime);
CREATE TRIGGER update_blocks_mtime_insert after insert on blocks for each row
begin
update blocks set mtime = strftime('%s', 'now') where pos = new.pos;
end;
CREATE TRIGGER update_blocks_mtime_update after update on blocks for each row
begin
update blocks set mtime = strftime('%s', 'now') where pos = old.pos;
end;