Permalink
Browse files

update migration file

  • Loading branch information...
1 parent 9f48230 commit 2cbe3a20eb128c216b1d345d6d8bad2425e624da @sunng87 committed Feb 27, 2012
Showing with 13 additions and 3 deletions.
  1. +13 −3 src/lobos/migrations.clj
View
16 src/lobos/migrations.clj
@@ -11,9 +11,9 @@
(create
(table :kusers (integer :id :primary-key :auto-inc)
(varchar :email 100 :unique)
- (timestamp :next-update)))
+ (timestamp :nextupdate)))
(index :kusers [:email])
- (index :kusers [:next-update]))
+ (index :kusers [:nextupdate]))
(down []
(drop (table :kusers))))
@@ -24,9 +24,19 @@
(integer :user-id :not-null)
(integer :service :not-null)
(integer :karma :not-null)
- (integer :karma-alt)))
+ (integer :karma_alt)))
(index :karma [:user-id]))
(down []
(drop (table :karma))))
+
+(defmigration rename-user-table-timestamp
+ (up []
+ (alter
+ (table :kusers
+ (column :nextupdate :to :lastupdate))))
+ (down []
+ (alter
+ (table :kusers
+ (column :lastupdate :to :nextupdate)))))

0 comments on commit 2cbe3a2

Please sign in to comment.