freshyo/packages/db_helper_sqlite/drizzle/0008_superadmins.sql
2026-10-06 11:53:12 +05:30

13 lines
544 B
SQL

-- Migration: platform superadmins table.
-- One row per human superadmin. Global by definition (no region, no role);
-- authenticated via the superadmin.* scope (superadmin.auth.login).
-- Pure CREATE: safe on populated D1 databases (no drops, no rebuilds).
CREATE TABLE `superadmins` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`name` text NOT NULL,
`password` text NOT NULL,
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL
);
--> statement-breakpoint
CREATE UNIQUE INDEX `superadmins_name_unique` ON `superadmins` (`name`);