diff --git a/db/migrate/20230419153741_add_status_cache.rb b/db/migrate/20230419153741_add_status_cache.rb new file mode 100644 index 000000000..9e244a046 --- /dev/null +++ b/db/migrate/20230419153741_add_status_cache.rb @@ -0,0 +1,5 @@ +class AddStatusCache < ActiveRecord::Migration[7.0] + def change + add_column :sales_logs, :status_cache, :integer, null: false, default: 0 + end +end diff --git a/db/schema.rb b/db/schema.rb index e87364403..734968255 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2023_04_18_095819) do +ActiveRecord::Schema[7.0].define(version: 2023_04_19_153741) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -590,6 +590,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_04_18_095819) do t.integer "student_not_child_value_check" t.integer "percentage_discount_value_check" t.integer "buyer_livein_value_check" + t.integer "status_cache", default: 0, null: false t.index ["bulk_upload_id"], name: "index_sales_logs_on_bulk_upload_id" t.index ["created_by_id"], name: "index_sales_logs_on_created_by_id" t.index ["old_id"], name: "index_sales_logs_on_old_id", unique: true