Encode title as JSON text so create/list work with pgx, and keep the table migration permission-free so rows are added from admin. Co-authored-by: Cursor <cursoragent@cursor.com>
8 lines
343 B
SQL
8 lines
343 B
SQL
CREATE TABLE IF NOT EXISTS mini_slider (
|
|
"id" bigserial primary key,
|
|
"title" json NOT NULL DEFAULT '{}'::json,
|
|
"img" character varying(250) NOT NULL DEFAULT '',
|
|
"updated_at" TIMESTAMP DEFAULT (CURRENT_TIMESTAMP AT TIME ZONE 'UTC') NOT NULL,
|
|
"created_at" TIMESTAMP DEFAULT (CURRENT_TIMESTAMP AT TIME ZONE 'UTC') NOT NULL
|
|
);
|