mirror of
https://github.com/standardnotes/server
synced 2026-01-16 20:04:32 -05:00
* chore: release latest changes * update yarn lockfile * remove stale files * fix ci env * remove mysql command overwrite * remove mysql overwrite from example * fix cookie cooldown in memory
20 lines
906 B
TypeScript
20 lines
906 B
TypeScript
import { MigrationInterface, QueryRunner } from 'typeorm'
|
|
|
|
export class AddRevokedSessionPrivateIdentifier1709206805226 implements MigrationInterface {
|
|
name = 'AddRevokedSessionPrivateIdentifier1709206805226'
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(
|
|
"ALTER TABLE `revoked_sessions` ADD `private_identifier` varchar(36) NULL COMMENT 'Used to identify a session without exposing the UUID in client-side cookies.'",
|
|
)
|
|
await queryRunner.query(
|
|
'CREATE INDEX `index_revoked_sessions_on_private_identifier` ON `revoked_sessions` (`private_identifier`)',
|
|
)
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query('DROP INDEX `index_revoked_sessions_on_private_identifier` ON `revoked_sessions`')
|
|
await queryRunner.query('ALTER TABLE `revoked_sessions` DROP COLUMN `private_identifier`')
|
|
}
|
|
}
|