add: init sql

This commit is contained in:
EUForest 2026-01-06 16:16:42 +08:00
parent 23ef9dbff1
commit 24c7fc8857
4 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,2 @@
-- Remove status column from redemption_code table
ALTER TABLE `redemption_code` DROP COLUMN `status`;

View File

@ -0,0 +1,2 @@
-- Add status column to redemption_code table
ALTER TABLE `redemption_code` ADD COLUMN `status` TINYINT NOT NULL DEFAULT 1 COMMENT 'Status: 1=enabled, 0=disabled' AFTER `quantity`;

View File

@ -0,0 +1,2 @@
-- Remove device limit configuration from system table
DELETE FROM `system` WHERE `category` = 'register' AND `key` = 'DeviceLimit';

View File

@ -0,0 +1,3 @@
-- Add device limit configuration to system table
INSERT IGNORE INTO `system` (`id`, `category`, `key`, `value`, `type`, `desc`, `created_at`, `updated_at`)
VALUES (43, 'register', 'DeviceLimit', '5', 'int', 'Device binding limit', NOW(), NOW());