Learning/.checkout/schema.sql
2023-05-05 20:53:21 +02:00

25 lines
675 B
SQL

CREATE TABLE `cards` (
`id` bigint(20) UNSIGNED NOT NULL,
`value` varchar(256) DEFAULT NULL,
`column_id` int(10) UNSIGNED DEFAULT NULL,
`is_done` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `columns` (
`id` int(10) UNSIGNED NOT NULL,
`title` varchar(64) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
ALTER TABLE `cards`
ADD PRIMARY KEY (`id`);
ALTER TABLE `columns`
ADD PRIMARY KEY (`id`);
ALTER TABLE `cards`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `columns`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
COMMIT;