-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into bugfix/fix-event-cover-flow
- Loading branch information
Showing
27 changed files
with
794 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm'; | ||
|
||
const TABLE_NAME = 'Users'; | ||
|
||
export class RemoveUsersLastLoginColumn1711518997063 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.dropColumn(TABLE_NAME, 'lastLogin'); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.addColumn(TABLE_NAME, new TableColumn({ | ||
name: 'lastLogin', | ||
type: 'timestamptz', | ||
default: 'CURRENT_TIMESTAMP(6)', | ||
})); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { MigrationInterface, QueryRunner, TableColumn, TableIndex, TableForeignKey } from 'typeorm'; | ||
|
||
const TABLE_NAME = 'Feedback'; | ||
const OLD_NAME = 'title'; | ||
const NEW_NAME = 'source'; | ||
|
||
export class AddFeedbackEventColum1711860173561 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "${TABLE_NAME}" RENAME COLUMN "${OLD_NAME}" TO "${NEW_NAME}"`); | ||
await queryRunner.query(`ALTER TABLE "${TABLE_NAME}" ALTER COLUMN "${NEW_NAME}" TYPE text`); | ||
|
||
await queryRunner.addColumn( | ||
TABLE_NAME, | ||
new TableColumn({ | ||
name: 'event', | ||
type: 'uuid', | ||
isNullable: true, | ||
}), | ||
); | ||
|
||
await queryRunner.createIndex( | ||
TABLE_NAME, | ||
new TableIndex({ | ||
name: 'feedback_by_event_index', | ||
columnNames: ['event'], | ||
}), | ||
); | ||
|
||
await queryRunner.createForeignKey( | ||
TABLE_NAME, | ||
new TableForeignKey({ | ||
columnNames: ['event'], | ||
referencedTableName: 'Events', | ||
referencedColumnNames: ['uuid'], | ||
onDelete: 'CASCADE', | ||
}), | ||
); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.dropForeignKey(TABLE_NAME, new TableForeignKey({ | ||
columnNames: ['event'], | ||
referencedTableName: 'Events', | ||
referencedColumnNames: ['uuid'], | ||
onDelete: 'CASCADE', | ||
})); | ||
|
||
await queryRunner.dropIndex(TABLE_NAME, 'feedback_by_event_index'); | ||
await queryRunner.dropColumn(TABLE_NAME, 'event'); | ||
|
||
await queryRunner.query(`ALTER TABLE "${TABLE_NAME}" ALTER COLUMN "${NEW_NAME}" TYPE varchar(255)`); | ||
await queryRunner.query(`ALTER TABLE "${TABLE_NAME}" RENAME COLUMN "${NEW_NAME}" TO "${OLD_NAME}"`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.