Переход с SQLite3 на PostgreSQL

This commit is contained in:
2025-03-13 15:04:24 +03:00
parent 0afe9f974f
commit 0eb0685115
6 changed files with 48 additions and 18 deletions

View File

@@ -1,12 +1,8 @@
BEGIN;
CREATE TABLE IF NOT EXISTS 'wins'
(
'id' Integer PRIMARY KEY AUTOINCREMENT,
'timestamp' DateTime NOT NULL DEFAULT (datetime(CURRENT_TIMESTAMP, 'localtime')),
'data' Text NOT NULL
);
CREATE INDEX IF NOT EXISTS 'index_timestamp' ON 'wins' ('timestamp');
CREATE TABLE "public"."wins" (
"data" JSON NOT NULL,
"timestamp" Timestamp Without Time Zone DEFAULT CURRENT_TIMESTAMP );
;
COMMIT;