mirror of
https://codeberg.org/timelimit/timelimit-server.git
synced 2026-08-31 19:03:45 +02:00
Fix migration for user limit login categories for mariadb
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ export async function up (queryInterface: QueryInterface, sequelize: Sequelize)
|
|||||||
}, async (transaction) => {
|
}, async (transaction) => {
|
||||||
await sequelize.query(
|
await sequelize.query(
|
||||||
'CREATE TABLE `UserLimitLoginCategories`' +
|
'CREATE TABLE `UserLimitLoginCategories`' +
|
||||||
'(`familyId` TEXT NOT NULL, `userId` TEXT NOT NULL, `categoryId` TEXT NOT NULL,' +
|
'(`familyId` VARCHAR(10) NOT NULL, `userId` VARCHAR(6) NOT NULL, `categoryId` VARCHAR(6) NOT NULL,' +
|
||||||
'PRIMARY KEY(`familyId`, `userId`), FOREIGN KEY(`familyId`, `userId`) REFERENCES `Users`(`familyId`, `userId`) ON UPDATE CASCADE ON DELETE CASCADE , FOREIGN KEY(`familyId`, `categoryId`) REFERENCES `Categories`(`familyId`, `categoryId`) ON UPDATE CASCADE ON DELETE CASCADE )',
|
'PRIMARY KEY(`familyId`, `userId`), FOREIGN KEY(`familyId`, `userId`) REFERENCES `Users`(`familyId`, `userId`) ON UPDATE CASCADE ON DELETE CASCADE , FOREIGN KEY(`familyId`, `categoryId`) REFERENCES `Categories`(`familyId`, `categoryId`) ON UPDATE CASCADE ON DELETE CASCADE )',
|
||||||
{ transaction }
|
{ transaction }
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user