From 1d5e4d22e75c832da668e34042c0c2b15ed36fe1 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 29 Jun 2012 14:34:19 +1000 Subject: [PATCH] Add pending spree migrations --- ...9043042_increase_scale_of_tax_rate_amount.spree.rb | 10 ++++++++++ ...eset_password_sent_at_to_spree_users.spree_auth.rb | 6 ++++++ .../20120629043045_resize_api_key_field.spree_api.rb | 6 ++++++ db/schema.rb | 11 ++++++----- 4 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 db/migrate/20120629043042_increase_scale_of_tax_rate_amount.spree.rb create mode 100644 db/migrate/20120629043043_add_reset_password_sent_at_to_spree_users.spree_auth.rb create mode 100644 db/migrate/20120629043045_resize_api_key_field.spree_api.rb diff --git a/db/migrate/20120629043042_increase_scale_of_tax_rate_amount.spree.rb b/db/migrate/20120629043042_increase_scale_of_tax_rate_amount.spree.rb new file mode 100644 index 0000000000..f4725b09d9 --- /dev/null +++ b/db/migrate/20120629043042_increase_scale_of_tax_rate_amount.spree.rb @@ -0,0 +1,10 @@ +# This migration comes from spree (originally 20120507232704) +class IncreaseScaleOfTaxRateAmount < ActiveRecord::Migration + def up + change_column :spree_tax_rates, :amount, :decimal, { :scale => 5, :precision => 8 } + end + + def down + change_column :spree_tax_rates, :amount, :decimal, { :scale => 4, :precision => 8 } + end +end diff --git a/db/migrate/20120629043043_add_reset_password_sent_at_to_spree_users.spree_auth.rb b/db/migrate/20120629043043_add_reset_password_sent_at_to_spree_users.spree_auth.rb new file mode 100644 index 0000000000..7632ac3417 --- /dev/null +++ b/db/migrate/20120629043043_add_reset_password_sent_at_to_spree_users.spree_auth.rb @@ -0,0 +1,6 @@ +# This migration comes from spree_auth (originally 20120203010234) +class AddResetPasswordSentAtToSpreeUsers < ActiveRecord::Migration + def change + add_column :spree_users, :reset_password_sent_at, :datetime + end +end diff --git a/db/migrate/20120629043045_resize_api_key_field.spree_api.rb b/db/migrate/20120629043045_resize_api_key_field.spree_api.rb new file mode 100644 index 0000000000..cdd4430364 --- /dev/null +++ b/db/migrate/20120629043045_resize_api_key_field.spree_api.rb @@ -0,0 +1,6 @@ +# This migration comes from spree_api (originally 20120411123334) +class ResizeApiKeyField < ActiveRecord::Migration + def change + change_column :spree_users, :api_key, :string, :limit => 48 + end +end diff --git a/db/schema.rb b/db/schema.rb index c5fcc6a90e..013551561f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20120626233350) do +ActiveRecord::Schema.define(:version => 20120629043045) do create_table "distributors", :force => true do |t| t.string "name" @@ -524,7 +524,7 @@ ActiveRecord::Schema.define(:version => 20120626233350) do end create_table "spree_tax_rates", :force => true do |t| - t.decimal "amount", :precision => 8, :scale => 4 + t.decimal "amount", :precision => 8, :scale => 5 t.integer "zone_id" t.integer "tax_category_id" t.datetime "created_at" @@ -585,8 +585,8 @@ ActiveRecord::Schema.define(:version => 20120626233350) do t.string "persistence_token" t.string "reset_password_token" t.string "perishable_token" - t.integer "sign_in_count", :default => 0, :null => false - t.integer "failed_attempts", :default => 0, :null => false + t.integer "sign_in_count", :default => 0, :null => false + t.integer "failed_attempts", :default => 0, :null => false t.datetime "last_request_at" t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" @@ -601,7 +601,8 @@ ActiveRecord::Schema.define(:version => 20120626233350) do t.string "unlock_token" t.datetime "locked_at" t.datetime "remember_created_at" - t.string "api_key", :limit => 40 + t.string "api_key", :limit => 48 + t.datetime "reset_password_sent_at" end add_index "spree_users", ["persistence_token"], :name => "index_users_on_persistence_token"