aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Florisson2012-12-13 19:15:15 +0100
committerMarc Florisson2012-12-13 19:15:15 +0100
commit56dfbf2382a399084e633f38c4ea9eaa48124dd1 (patch)
treea37e7bf7156519bd2713c3036aa1ecacf8f3e574
parent988800310d2e6ae3dfc0935506eeae12f21c9ed6 (diff)
downloadchouette-core-56dfbf2382a399084e633f38c4ea9eaa48124dd1.tar.bz2
add migration
-rw-r--r--db/migrate/20121211085620_create_api_key.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/db/migrate/20121211085620_create_api_key.rb b/db/migrate/20121211085620_create_api_key.rb
new file mode 100644
index 000000000..6fa225876
--- /dev/null
+++ b/db/migrate/20121211085620_create_api_key.rb
@@ -0,0 +1,14 @@
+class CreateApiKey < ActiveRecord::Migration
+ def up
+ create_table :api_keys do |a|
+ a.belongs_to :referential
+ a.string :token
+ a.string :name
+ a.timestamps
+ end
+ end
+
+ def down
+ drop_table :api_keys
+ end
+end