1682926032072-cache-entries.ts 572 B

123456789101112131415
  1. import { MigrationInterface, QueryRunner } from 'typeorm'
  2. export class cacheEntries1682926032072 implements MigrationInterface {
  3. name = 'cacheEntries1682926032072'
  4. public async up(queryRunner: QueryRunner): Promise<void> {
  5. await queryRunner.query(
  6. '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',
  7. )
  8. }
  9. public async down(queryRunner: QueryRunner): Promise<void> {
  10. await queryRunner.query('DROP TABLE `cache_entries`')
  11. }
  12. }