mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Set user token as unique (#9381)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { Knex } from 'knex';
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.alterTable('directus_users', (table) => {
|
||||
table.unique(['token']);
|
||||
});
|
||||
}
|
||||
|
||||
export async function down(knex: Knex): Promise<void> {
|
||||
await knex.schema.alterTable('directus_users', (table) => {
|
||||
table.dropUnique(['token']);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user