mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Merge pull request #11138 from Matt-Yorkley/variant-timestamps
Add timestamps to variants table
This commit is contained in:
5
db/migrate/20230628144825_variant_timestamps.rb
Normal file
5
db/migrate/20230628144825_variant_timestamps.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class VariantTimestamps < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
add_timestamps :spree_variants, null: false, default: -> { "NOW()" }
|
||||
end
|
||||
end
|
||||
@@ -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_06_28_131123) do
|
||||
ActiveRecord::Schema[7.0].define(version: 2023_06_28_144825) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_stat_statements"
|
||||
enable_extension "plpgsql"
|
||||
@@ -1088,6 +1088,8 @@ ActiveRecord::Schema[7.0].define(version: 2023_06_28_131123) do
|
||||
t.datetime "import_date", precision: nil
|
||||
t.string "variant_unit"
|
||||
t.string "unit_presentation"
|
||||
t.datetime "created_at", default: -> { "now()" }, null: false
|
||||
t.datetime "updated_at", default: -> { "now()" }, null: false
|
||||
t.index ["product_id"], name: "index_variants_on_product_id"
|
||||
t.index ["sku"], name: "index_spree_variants_on_sku"
|
||||
t.check_constraint "unit_value > 0::double precision", name: "positive_unit_value"
|
||||
|
||||
Reference in New Issue
Block a user