Permalink
Browse files

Added SQL files to migrate permission model from 0.2 to 0.3

  • Loading branch information...
1 parent 5111912 commit 44e9397f234105350c13e38e9696b56d9139610a @jezdez jezdez committed Jul 23, 2009
Showing with 44 additions and 0 deletions.
  1. +16 −0 migrations/0.2-0.3.mysql.sql
  2. +14 −0 migrations/0.2-0.3.postgres.sql
  3. +14 −0 migrations/0.2-0.3.sqlite.sql
@@ -0,0 +1,16 @@
+BEGIN;
+-- Application: authority
+-- Model: Permission
+ALTER TABLE `authority_permission`
+ ADD `date_requested` DATETIME;
+ALTER TABLE `authority_permission`
+ ADD `approved` BOOL;
+ALTER TABLE `authority_permission`
+ ADD `date_approved` DATETIME;
+ALTER TABLE `authority_permission`
+ MODIFY `object_id` INTEGER UNSIGNED;
+UPDATE `authority_permission`
+ SET `approved` = TRUE;
+UPDATE `authority_permission`
+ SET `date_approved` = NOW();
+COMMIT;
@@ -0,0 +1,14 @@
+BEGIN;
+-- Application: authority
+-- Model: Permission
+ALTER TABLE "authority_permission"
+ ADD "date_requested" timestamp with time zone;
+ALTER TABLE "authority_permission"
+ ADD "approved" boolean;
+ALTER TABLE "authority_permission"
+ ADD "date_approved" timestamp with time zone;
+UPDATE "authority_permission"
+ SET "approved" = True;
+UPDATE "authority_permission"
+ SET "date_approved" = NOW();
+COMMIT;
@@ -0,0 +1,14 @@
+BEGIN;
+-- Application: authority
+-- Model: Permission
+ALTER TABLE "authority_permission"
+ ADD "date_requested" datetime;
+ALTER TABLE "authority_permission"
+ ADD "approved" bool;
+ALTER TABLE "authority_permission"
+ ADD "date_approved" datetime;
+UPDATE "authority_permission"
+ SET "approved" = 1;
+UPDATE "authority_permission"
+ SET "date_approved" = DATETIME("NOW");
+COMMIT;

0 comments on commit 44e9397

Please sign in to comment.