Add Login system
[cs356-p2-videostore.git] / db / migrate / 027_create_users.rb
diff --git a/db/migrate/027_create_users.rb b/db/migrate/027_create_users.rb
new file mode 100644 (file)
index 0000000..805a573
--- /dev/null
@@ -0,0 +1,14 @@
+class CreateUsers < ActiveRecord::Migration
+  def self.up
+    create_table :users do |t|
+      t.column :name, :string, :null => false
+      t.column :hashed_password, :string
+      t.column :salt, :string
+      t.column :manager, :boolean, :default => false
+    end
+  end
+
+  def self.down
+    drop_table :users
+  end
+end