Sha256: b11a6b0b6061d2fc20454b939c37713016cb4008770598aa8049da11903b4acc

Contents?: true

Size: 806 Bytes

Versions: 3

Compression:

Stored size: 806 Bytes

Contents

create_schema do |connection|
  connection.create_table(:reservations, :force => true) do |t|
    t.string :name
    t.date :starts
    t.date :ends
    t.integer :parties_count
    t.integer :lodgings_count
    t.integer :lock_version, :default => 0
    t.timestamps
  end
  
  connection.create_table(:parties, :force => true) do |t|
    t.string :name
    t.belongs_to :reservation
    t.integer :party_lodgings_count
    t.timestamps
  end
  
  connection.create_table(:lodgings, :force => true) do |t|
    t.integer :room_number
    t.decimal :rate
    t.belongs_to :reservation
    t.date :date
    t.integer :party_lodgings_count
    t.timestamps
  end
  
  connection.create_table(:party_lodgings, :force => true) do |t|
    t.belongs_to :party
    t.belongs_to :lodging
    t.timestamps
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
graph_mediator-0.2.3 spec/reservations/schema.rb
graph_mediator-0.2.2 spec/reservations/schema.rb
graph_mediator-0.2.1 spec/reservations/schema.rb