]> git.openstreetmap.org Git - rails.git/commitdiff
Add an administrator flag to the user table.
authorTom Hughes <tom@compton.nu>
Wed, 13 Aug 2008 08:12:09 +0000 (08:12 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 13 Aug 2008 08:12:09 +0000 (08:12 +0000)
db/migrate/012_add_admin_flag.rb [new file with mode: 0644]

diff --git a/db/migrate/012_add_admin_flag.rb b/db/migrate/012_add_admin_flag.rb
new file mode 100644 (file)
index 0000000..24f2d4e
--- /dev/null
@@ -0,0 +1,9 @@
+class AddAdminFlag < ActiveRecord::Migration
+  def self.up
+    add_column "users", "administrator", :boolean, :default => false, :null => false
+  end
+
+  def self.down
+    remove_column "users", "administrator"
+  end
+end