Files
main-tbbank/backend/db/migrations/20260818150000_mini_slider.up.sql
GuwandykA 262292651a Fix mini-slider admin CRUD JSON encoding and drop seed data from the migration.
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>
2026-08-18 19:04:48 +05:00

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
);