dockerfile/examples/standardnotes/official-src/server-main/packages/auth/migrations/mysql/1682926032072-cache-entries.ts

16 lines
572 B
TypeScript
Raw Normal View History

2024-03-15 14:52:38 +08:00
import { MigrationInterface, QueryRunner } from 'typeorm'
export class cacheEntries1682926032072 implements MigrationInterface {
name = 'cacheEntries1682926032072'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
'CREATE TABLE `cache_entries` (`uuid` varchar(36) NOT NULL, `key` text NOT NULL, `value` text NOT NULL, `expires_at` datetime NULL, PRIMARY KEY (`uuid`)) ENGINE=InnoDB',
)
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query('DROP TABLE `cache_entries`')
}
}