mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-04 21:37:45 +00:00
* postgres: modules structure (#5401) * postgres: schema, field conversions (#5430) * postgres: rework chat list pagination query (#5441) * prepare cabal for merge * restore cabal changes * simplexmq * postgres: implementation wip (tests don't pass) (#5481) * restore ios file * postgres: implementation - tests pass (#5487) * refactor DB options * refactor * line * style * style * refactor * $ * update simplexmq * constraintError * handleDBErrors * fix * remove param * Ok * case * case * case * comment --------- Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
19 lines
495 B
Haskell
19 lines
495 B
Haskell
{-# LANGUAGE QuasiQuotes #-}
|
|
|
|
module Simplex.Chat.Store.SQLite.Migrations.M20220928_settings where
|
|
|
|
import Database.SQLite.Simple (Query)
|
|
import Database.SQLite.Simple.QQ (sql)
|
|
|
|
m20220928_settings :: Query
|
|
m20220928_settings =
|
|
[sql|
|
|
CREATE TABLE settings (
|
|
settings_id INTEGER PRIMARY KEY,
|
|
chat_item_ttl INTEGER,
|
|
user_id INTEGER NOT NULL REFERENCES users ON DELETE CASCADE,
|
|
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
|
updated_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
);
|
|
|]
|