Compare commits
No commits in common. "dd14a96e98631c2bbb3483c039ae3289cdbd5695" and "8662652e1a5c04f407c1a56ae8930c7d0260a685" have entirely different histories.
dd14a96e98
...
8662652e1a
@ -9,10 +9,10 @@ class TablesArrangementsController < ApplicationController
|
||||
render json: TablesArrangement
|
||||
.order(valid: :desc)
|
||||
.order(discomfort: :asc)
|
||||
.select(:id, :name, :discomfort, :status)
|
||||
.select(:id, :name, :discomfort)
|
||||
.select("digest = '#{current_digest}'::uuid as valid")
|
||||
.limit(20)
|
||||
.as_json(only: %i[id name discomfort valid status])
|
||||
.as_json(only: %i[id name discomfort valid])
|
||||
end
|
||||
|
||||
def show
|
||||
|
||||
@ -10,7 +10,6 @@
|
||||
# digest :uuid not null
|
||||
# discomfort :integer
|
||||
# name :string not null
|
||||
# status :string default("complete"), not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# wedding_id :uuid not null
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
class AddStatusColumnToTablesArrangements < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
add_column :tables_arrangements, :status, :string, default: :complete, null: false
|
||||
end
|
||||
end
|
||||
3
db/schema.rb
generated
3
db/schema.rb
generated
@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.0].define(version: 2025_08_01_102437) do
|
||||
ActiveRecord::Schema[8.0].define(version: 2025_06_08_181054) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_catalog.plpgsql"
|
||||
|
||||
@ -216,7 +216,6 @@ ActiveRecord::Schema[8.0].define(version: 2025_08_01_102437) do
|
||||
t.string "name", null: false
|
||||
t.uuid "wedding_id", null: false
|
||||
t.uuid "digest", default: -> { "gen_random_uuid()" }, null: false
|
||||
t.string "status", default: "complete", null: false
|
||||
t.index ["wedding_id"], name: "index_tables_arrangements_on_wedding_id"
|
||||
end
|
||||
|
||||
|
||||
@ -19,8 +19,7 @@ RSpec.describe 'tables_arrangements' do
|
||||
id: { type: :string, format: :uuid },
|
||||
name: { type: :string },
|
||||
discomfort: { type: :integer },
|
||||
valid: { type: :boolean },
|
||||
status: { type: :string, enum: %w[complete in_progress] }
|
||||
valid: { type: :boolean }
|
||||
}
|
||||
}
|
||||
xit
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user