Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

update migration file

  • Loading branch information...
commit 2cbe3a20eb128c216b1d345d6d8bad2425e624da 1 parent 9f48230
Sun Ning authored February 27, 2012

Showing 1 changed file with 13 additions and 3 deletions. Show diff stats Hide diff stats

  1. 16  src/lobos/migrations.clj
16  src/lobos/migrations.clj
@@ -11,9 +11,9 @@
11 11
       (create 
12 12
        (table :kusers (integer :id :primary-key :auto-inc)
13 13
               (varchar :email 100 :unique)
14  
-              (timestamp :next-update)))
  14
+              (timestamp :nextupdate)))
15 15
       (index :kusers [:email])
16  
-      (index :kusers [:next-update]))
  16
+      (index :kusers [:nextupdate]))
17 17
   (down []
18 18
         (drop (table :kusers))))
19 19
 
@@ -24,9 +24,19 @@
24 24
               (integer :user-id :not-null)
25 25
               (integer :service :not-null)
26 26
               (integer :karma :not-null)
27  
-              (integer :karma-alt)))
  27
+              (integer :karma_alt)))
28 28
       (index :karma [:user-id]))
29 29
   (down []
30 30
         (drop (table :karma))))
  31
+
  32
+(defmigration rename-user-table-timestamp
  33
+  (up []
  34
+      (alter
  35
+       (table :kusers
  36
+              (column :nextupdate :to :lastupdate))))
  37
+  (down []
  38
+        (alter
  39
+         (table :kusers
  40
+                (column :lastupdate :to :nextupdate)))))
31 41
   
32 42
 

0 notes on commit 2cbe3a2

Please sign in to comment.
Something went wrong with that request. Please try again.