-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from Giveth/project-import-flag
Added import flag to projects
- Loading branch information
Showing
6 changed files
with
44 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module.exports = class Data1717657836767 { | ||
name = 'Data1717657836767' | ||
|
||
async up(db) { | ||
await db.query(`ALTER TABLE "project" ADD "imported" boolean`) | ||
} | ||
|
||
async down(db) { | ||
await db.query(`ALTER TABLE "project" DROP COLUMN "imported"`) | ||
} | ||
} |
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,21 @@ | ||
module.exports = class Data1717658264897 { | ||
name = "Data1717658264897"; | ||
|
||
async up(db) { | ||
// fill the new column with default values | ||
await db.query(`UPDATE "project" SET "imported" = false`); | ||
await db.query( | ||
`ALTER TABLE "project" ALTER COLUMN "imported" SET NOT NULL` | ||
); | ||
await db.query( | ||
`CREATE INDEX "IDX_408502a376cb8a2d0eb8f94ad5" ON "project" ("imported") ` | ||
); | ||
} | ||
|
||
async down(db) { | ||
await db.query( | ||
`ALTER TABLE "project" ALTER COLUMN "imported" DROP NOT NULL` | ||
); | ||
await db.query(`DROP INDEX "public"."IDX_408502a376cb8a2d0eb8f94ad5"`); | ||
} | ||
}; |
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