beteran-api-kgon-server-ser.../migrations/202208051000_api_kgon_synchronization/up.sql
2022-08-18 02:48:35 +00:00

9 lines
343 B
SQL

CREATE TABLE IF NOT EXISTS api_kgon_synchronizations (
id SERIAL PRIMARY KEY,
item TEXT NOT NULL,
last_code BIGINT NOT NULL,
synchronized_at BIGINT NOT NULL DEFAULT (extract(epoch from now()) * 1000)
);
CREATE UNIQUE INDEX uidx_api_kgon_synchronizations_item ON api_kgon_synchronizations (item);