Skip to content

Commit

Permalink
✨ add ordering to origins_variables table
Browse files Browse the repository at this point in the history
  • Loading branch information
Marigold committed Oct 30, 2023
1 parent 5081d4b commit 32bc060
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion db/migration/1697464705200-PostsGdocsLinksDisplayOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class PostsGdocsLinksDisplayOrder1697464705200
public async down(queryRunner: QueryRunner): Promise<void> {
queryRunner.query(
`ALTER TABLE posts_gdocs_variables_faqs
DROP COLUMN display_order;`
DROP COLUMN displayOrder;`
)
}
}
2 changes: 1 addition & 1 deletion db/migration/1698301390787-TopicTagsDisplayOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class TopicTagsDisplayOrder1698301390787 implements MigrationInterface {
public async down(queryRunner: QueryRunner): Promise<void> {
queryRunner.query(
`ALTER TABLE tags_variables_topic_tags
DROP COLUMN display_order;`
DROP COLUMN displayOrder;`
)
}
}
19 changes: 19 additions & 0 deletions db/migration/1698655095475-OriginsVariablesDisplayOrder.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { MigrationInterface, QueryRunner } from "typeorm"

export class OriginsVariablesDisplayOrder1698655095475
implements MigrationInterface
{
public async up(queryRunner: QueryRunner): Promise<void> {
queryRunner.query(
`ALTER TABLE origins_variables
ADD COLUMN displayOrder SMALLINT NOT NULL DEFAULT 0;`
)
}

public async down(queryRunner: QueryRunner): Promise<void> {
queryRunner.query(
`ALTER TABLE origins_variables
DROP COLUMN displayOrder;`
)
}
}

0 comments on commit 32bc060

Please sign in to comment.