Split up dark and light color settings
Previously it was possible to choose a color combination that was almost impossible to read (due to contrast). Now we have prevented this from happening, as well as giving the user more customizability.pull/123/head
parent
0c5a221e0f
commit
dc27ae9868
@ -0,0 +1,24 @@
|
||||
import {MigrationInterface, QueryRunner, TableColumn} from 'typeorm'
|
||||
|
||||
export class splitColor1669420187764 implements MigrationInterface {
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.addColumn(
|
||||
'settings',
|
||||
new TableColumn({name: 'lightColor', type: 'text', isNullable: true}),
|
||||
)
|
||||
await queryRunner.addColumn(
|
||||
'settings',
|
||||
new TableColumn({name: 'darkColor', type: 'text', isNullable: true}),
|
||||
)
|
||||
await queryRunner.dropColumn('settings', 'color')
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.dropColumn('settings', 'darkColor')
|
||||
await queryRunner.dropColumn('settings', 'lightColor')
|
||||
await queryRunner.addColumn(
|
||||
'settings',
|
||||
new TableColumn({name: 'color', type: 'text', isNullable: true}),
|
||||
)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue