Sha256: 6e792b304bdc2187ae77695bf2b461f9ad8785da6bc91a139b13eb4cd1cee170

Contents?: true

Size: 1.56 KB

Versions: 4

Compression:

Stored size: 1.56 KB

Contents

#
# schema.rb auto-generated using ActiveFacts for SeparateSubtype on 2015-07-08
#

ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Schema.define(:version => 20150708011603) do
  enable_extension 'pgcrypto' unless extension_enabled?('pgcrypto')
  create_table "claims", :id => false, :force => true do |t|
    t.column "claim_id", :primary_key, :null => false
    t.column "incident_date_time", :datetime, :null => true
    t.column "incident_witness_id", :integer, :null => true
  end


  create_table "people", :id => false, :force => true do |t|
    t.column "person_id", :primary_key, :null => false
    t.column "person_name", :string, :null => false
  end

  add_index "people", ["person_name"], :name => :index_people_on_person_name, :unique => true

  create_table "vehicle_incidents", :id => false, :force => true do |t|
    t.column "incident_claim_id", :primary_key, :null => false
    t.column "driver_id", :integer, :null => true
  end


  unless ENV["EXCLUDE_FKS"]
    add_foreign_key :claims, :people, :column => :incident_witness_id, :primary_key => :person_id, :on_delete => :cascade
    add_index :claims, [:incident_witness_id], :unique => false, :name => :index_claims_on_incident_witness_id
    add_foreign_key :vehicle_incidents, :claims, :column => :incident_claim_id, :primary_key => :claim_id, :on_delete => :cascade
    add_foreign_key :vehicle_incidents, :people, :column => :driver_id, :primary_key => :person_id, :on_delete => :cascade
    add_index :vehicle_incidents, [:driver_id], :unique => false, :name => :index_vehicle_incidents_on_driver_id
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
activefacts-examples-1.9.8 rails/schema/SeparateSubtype.schema.rb
activefacts-examples-1.8.0 rails/schema/SeparateSubtype.schema.rb
activefacts-examples-1.7.2 rails/schema/SeparateSubtype.schema.rb
activefacts-examples-1.7.1 rails/schema/SeparateSubtype.schema.rb