activate admin users created before is_active flag existed
authorTom Clegg <tom@clinicalfuture.com>
Wed, 26 Jun 2013 02:31:48 +0000 (22:31 -0400)
committerTom Clegg <tom@clinicalfuture.com>
Wed, 26 Jun 2013 02:31:48 +0000 (22:31 -0400)
services/api/db/migrate/20130626022810_activate_all_admins.rb [new file with mode: 0644]
services/api/db/schema.rb

diff --git a/services/api/db/migrate/20130626022810_activate_all_admins.rb b/services/api/db/migrate/20130626022810_activate_all_admins.rb
new file mode 100644 (file)
index 0000000..c86530d
--- /dev/null
@@ -0,0 +1,8 @@
+class ActivateAllAdmins < ActiveRecord::Migration
+  def up
+    User.update_all({is_active: true}, ['is_admin=?', true])
+  end
+
+  def down
+  end
+end
index 892afdbd36f4bd51cd4ae2ca6aac3419e380dc6b..c0b6597265160efc84a5ee8b24e1666fe4ba6cdf 100644 (file)
@@ -11,7 +11,7 @@
 #
 # It's strongly recommended to check this file into your version control system.
 
-ActiveRecord::Schema.define(:version => 20130626002829) do
+ActiveRecord::Schema.define(:version => 20130626022810) do
 
   create_table "api_client_authorizations", :force => true do |t|
     t.string   "api_token",               :null => false