Redo simulations lifecycle #222
| @ -7,8 +7,8 @@ | |||||||
| # Table name: tables_arrangements | # Table name: tables_arrangements | ||||||
| # | # | ||||||
| #  id         :uuid             not null, primary key | #  id         :uuid             not null, primary key | ||||||
|  | #  digest     :uuid             not null | ||||||
| #  discomfort :integer | #  discomfort :integer | ||||||
| #  guests_digest :uuid             not null |  | ||||||
| #  name       :string           not null | #  name       :string           not null | ||||||
| #  created_at :datetime         not null | #  created_at :datetime         not null | ||||||
| #  updated_at :datetime         not null | #  updated_at :datetime         not null | ||||||
|  | |||||||
| @ -62,7 +62,7 @@ module Tables | |||||||
| 
 | 
 | ||||||
|         arrangement.update!( |         arrangement.update!( | ||||||
|           discomfort:, |           discomfort:, | ||||||
|           guests_digest: self.class.digest(tables.first.first.wedding) |           digest: self.class.digest(tables.first.first.wedding) | ||||||
|         ) |         ) | ||||||
|       end |       end | ||||||
|     end |     end | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| class AddGuestsDigestColumnToTablesArrangements < ActiveRecord::Migration[8.0] | class AddGuestsDigestColumnToTablesArrangements < ActiveRecord::Migration[8.0] | ||||||
|   def change |   def change | ||||||
|     add_column :tables_arrangements, :guests_digest, :uuid, null: false, default: 'gen_random_uuid()' |     add_column :tables_arrangements, :digest, :uuid, null: false, default: 'gen_random_uuid()' | ||||||
|   end |   end | ||||||
| end | end | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								db/schema.rb
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								db/schema.rb
									
									
									
										generated
									
									
									
								
							| @ -206,7 +206,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_01_26_091823) do | |||||||
|     t.datetime "updated_at", null: false |     t.datetime "updated_at", null: false | ||||||
|     t.string "name", null: false |     t.string "name", null: false | ||||||
|     t.uuid "wedding_id", null: false |     t.uuid "wedding_id", null: false | ||||||
|     t.uuid "guests_digest", default: -> { "gen_random_uuid()" }, null: false |     t.uuid "digest", default: -> { "gen_random_uuid()" }, null: false | ||||||
|     t.index ["wedding_id"], name: "index_tables_arrangements_on_wedding_id" |     t.index ["wedding_id"], name: "index_tables_arrangements_on_wedding_id" | ||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user