]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/20130328184137_add_write_notes_permission.rb
Add a new write_notes permission needed for OAuth access to notes
[rails.git] / db / migrate / 20130328184137_add_write_notes_permission.rb
diff --git a/db/migrate/20130328184137_add_write_notes_permission.rb b/db/migrate/20130328184137_add_write_notes_permission.rb
new file mode 100644 (file)
index 0000000..c7da174
--- /dev/null
@@ -0,0 +1,11 @@
+class AddWriteNotesPermission < ActiveRecord::Migration
+  def up
+    add_column :oauth_tokens, :allow_write_notes, :boolean, :null => false, :default => false
+    add_column :client_applications, :allow_write_notes, :boolean, :null => false, :default => false
+  end
+
+  def down
+    remove_column :client_applications, :allow_write_notes
+    remove_column :oauth_tokens, :allow_write_notes
+  end
+end