standardnotes-server/packages/auth/migrations/mysql/1647862631224-add_readonly_sessions.ts
Karol Sójko 3aef5998df
feat: sqlite driver for auth service (#572)
* wip: initial sqlite bootstrap

* wip: switch to sqlite3 as default db type

* wip: boilerplate data

* fix(auth): case sensitive register and login

* fix(auth): refactor username validations

* fix(auth): allow changing username to both username and email:

* fix(auth): lock middleware for recovery log in

* fix(domain-core): specs for invalid types

* fix(auth): lock middleware specs

* fix(auth): typeorm code arrangements

* fix: running e2e on both mysql and sqlite in ci
2023-04-27 11:17:01 +02:00

11 lines
462 B
TypeScript

import { MigrationInterface, QueryRunner } from 'typeorm'
export class addReadonlySessions1647862631224 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query('ALTER TABLE `sessions` ADD `readonly_access` tinyint(1) NOT NULL DEFAULT 0')
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query('ALTER TABLE `sessions` DROP COLUMN `readonly_access`')
}
}