checked an removed todos where possible

This commit is contained in:
Ulf Gebhardt 2022-02-04 13:53:28 +01:00
parent 1025ba4336
commit 72af3ebdbc
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
2 changed files with 0 additions and 4 deletions

View File

@ -10,7 +10,6 @@ export async function upgrade(queryFn: (query: string, values?: any[]) => Promis
await queryFn('ALTER TABLE `state_users` DROP COLUMN `group_id`;')
// Remove the unique constraint from the pubkey
// TODO - check for code impact
await queryFn('ALTER TABLE `state_users` DROP INDEX `public_key`;')
// Allow NULL on the `state_users` pubkey like it is allowed on `login_users`
@ -21,11 +20,9 @@ export async function upgrade(queryFn: (query: string, values?: any[]) => Promis
await queryFn(
'ALTER TABLE `state_users` MODIFY COLUMN `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL;',
)
// TODO - check for code impact
await queryFn('ALTER TABLE `state_users` ADD CONSTRAINT `email` UNIQUE KEY (`email`);')
// Create `login_user_id` column - to store the login_users.id field to not break references.
// TODO - what happens when we create a new user - how do we generate the login_user_id?
await queryFn(
'ALTER TABLE `state_users` ADD COLUMN `login_user_id` int(10) unsigned DEFAULT NULL AFTER `id`;',
)

View File

@ -7,7 +7,6 @@
export async function upgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
// We only keep the passphrase, the mnemonic type is a constant,
// since every passphrase was converted to mnemonic type 2
// TODO there is now default NULL instead of NOT NULL - check code impact
await queryFn(
'ALTER TABLE `state_users` ADD COLUMN `passphrase` text DEFAULT NULL AFTER `publisher_id`;',
)