aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/001_create_users.rb15
-rw-r--r--db/schema.rb14
2 files changed, 29 insertions, 0 deletions
diff --git a/db/migrate/001_create_users.rb b/db/migrate/001_create_users.rb
new file mode 100644
index 000000000..ba528c038
--- /dev/null
+++ b/db/migrate/001_create_users.rb
@@ -0,0 +1,15 @@
+class CreateUsers < ActiveRecord::Migration
+ def self.up
+ create_table :users do |t|
+ t.column :email, :string
+ t.column :name, :string
+
+ t.column :hashed_password, :string
+ t.column :salt, :string
+ end
+ end
+
+ def self.down
+ drop_table :users
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
new file mode 100644
index 000000000..32e957c51
--- /dev/null
+++ b/db/schema.rb
@@ -0,0 +1,14 @@
+# This file is autogenerated. Instead of editing this file, please use the
+# migrations feature of ActiveRecord to incrementally modify your database, and
+# then regenerate this schema definition.
+
+ActiveRecord::Schema.define(:version => 1) do
+
+ create_table "users", :force => true do |t|
+ t.column "email", :string
+ t.column "name", :string
+ t.column "hashed_password", :string
+ t.column "salt", :string
+ end
+
+end