spec/dummy/db/schema.rb in openstax_accounts-1.0.0 vs spec/dummy/db/schema.rb in openstax_accounts-2.0.0
- old
+ new
@@ -9,23 +9,35 @@
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 0) do
+ActiveRecord::Schema.define(:version => 1) do
- create_table "openstax_accounts_users", :force => true do |t|
- t.integer "openstax_uid"
- t.string "username"
+ create_table "openstax_accounts_accounts", :force => true do |t|
+ t.integer "openstax_uid", :null => false
+ t.string "username", :null => false
t.string "first_name"
t.string "last_name"
t.string "full_name"
t.string "title"
t.string "access_token"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
- add_index "openstax_accounts_users", ["openstax_uid"], :name => "index_openstax_accounts_users_on_openstax_uid", :unique => true
- add_index "openstax_accounts_users", ["username"], :name => "index_openstax_accounts_users_on_username", :unique => true
+ add_index "openstax_accounts_accounts", ["access_token"], :name => "index_openstax_accounts_accounts_on_access_token", :unique => true
+ add_index "openstax_accounts_accounts", ["first_name"], :name => "index_openstax_accounts_accounts_on_first_name"
+ add_index "openstax_accounts_accounts", ["full_name"], :name => "index_openstax_accounts_accounts_on_full_name"
+ add_index "openstax_accounts_accounts", ["last_name"], :name => "index_openstax_accounts_accounts_on_last_name"
+ add_index "openstax_accounts_accounts", ["openstax_uid"], :name => "index_openstax_accounts_accounts_on_openstax_uid", :unique => true
+ add_index "openstax_accounts_accounts", ["username"], :name => "index_openstax_accounts_accounts_on_username", :unique => true
+
+ create_table "users", :force => true do |t|
+ t.integer "openstax_accounts_account_id"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "users", ["openstax_accounts_account_id"], :name => "index_users_on_openstax_accounts_account_id", :unique => true
end