Sha256: b23f0efb0facafe0623af6b19bef321bef53934808974366351b74abff6a5ae6

Contents?: true

Size: 730 Bytes

Versions: 10

Compression:

Stored size: 730 Bytes

Contents

Sequel.migration do
  up do
    create_table(:companies) do
      primary_key :id
      String :name, limit:100
      String :contact_person, limit:100
      String :contact_email, limit:100
      String :invoice_address, text: true
      String :postal_code, limit:50
      String :city, limit: 100
    end
    create_table(:employees) do
      primary_key :id
      String :name, limit:100
      String :email, limit:100
      foreign_key :company_id, :companies
    end
    create_table(:registrations) do
      primary_key :id
      foreign_key :employee_id, :employees
      foreign_key :event_id, :events
    end
  end
  down do
    drop_table(:registrations)
    drop_table(:employees)
    drop_table(:companies)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
qcourses-0.1.11 db/migrations/002_create_registrations.rb
qcourses-0.1.10 db/migrations/002_create_registrations.rb
qcourses-0.1.9 db/migrations/002_create_registrations.rb
qcourses-0.1.8 db/migrations/002_create_registrations.rb
qcourses-0.1.7 db/migrations/002_create_registrations.rb
qcourses-0.1.6 db/migrations/002_create_registrations.rb
qcourses-0.1.5 db/migrations/002_create_registrations.rb
qcourses-0.1.4 db/migrations/002_create_registrations.rb
qcourses-0.1.3 db/migrations/002_create_registrations.rb
qcourses-0.1.2 db/migrations/002_create_registrations.rb