Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
36 additions
and
1 deletion.
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,35 @@ | ||
import ckan.model | ||
|
||
|
||
def upgrade(migrate_engine): | ||
migrate_engine.execute( | ||
''' | ||
ALTER TABLE "group" | ||
ADD COLUMN "closed" BOOLEAN DEFAULT FALSE; | ||
UPDATE "group" set closed=false; | ||
ALTER TABLE "group_revision" | ||
ADD COLUMN "closed" BOOLEAN DEFAULT FALSE; | ||
UPDATE "group_revision" set closed=false; | ||
ALTER TABLE "group" | ||
ADD COLUMN "closed_date" timestamp without time zone; | ||
UPDATE "group" set closed_date=NULL; | ||
ALTER TABLE "group_revision" | ||
ADD COLUMN "closed_date" timestamp without time zone; | ||
UPDATE "group_revision" set closed_date=NULL; | ||
ALTER TABLE "group" | ||
ADD COLUMN "related_group_id" TEXT; | ||
UPDATE "group" set related_group_id=NULL; | ||
ALTER TABLE "group_revision" | ||
ADD COLUMN "related_group_id" TEXT; | ||
UPDATE "group_revision" set related_group_id=NULL; | ||
ALTER TABLE "group" | ||
ADD COLUMN "related_group_relationship" TEXT; | ||
UPDATE "group" set related_group_relationship=NULL; | ||
ALTER TABLE "group_revision" | ||
ADD COLUMN "related_group_relationship" TEXT; | ||
UPDATE "group_revision" set related_group_relationship=NULL; | ||
''' | ||
) |
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