|
| 1 | +# This file is auto-generated from the current state of the database. Instead of editing this file, |
| 2 | +# please use the migrations feature of Active Record to incrementally modify your database, and |
| 3 | +# then regenerate this schema definition. |
| 4 | +# |
| 5 | +# Note that this schema.rb definition is the authoritative source for your database schema. If you need |
| 6 | +# to create the application database on another system, you should be using db:schema:load, not running |
| 7 | +# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations |
| 8 | +# you'll amass, the slower it'll run and the greater likelihood for issues). |
| 9 | +# |
| 10 | +# It's strongly recommended to check this file into your version control system. |
| 11 | + |
| 12 | +ActiveRecord::Schema.define(:version => 0) do |
| 13 | + |
| 14 | + create_table "items", :force => true do |t| |
| 15 | + t.integer "person_id", :precision => 38, :scale => 0 |
| 16 | + end |
| 17 | + |
| 18 | + create_table "items_people", :id => false, :force => true do |t| |
| 19 | + t.integer "person_id", :precision => 38, :scale => 0 |
| 20 | + t.integer "item_id", :precision => 38, :scale => 0 |
| 21 | + end |
| 22 | + |
| 23 | + create_table "people", :force => true do |t| |
| 24 | + t.string "first_name" |
| 25 | + t.string "last_name" |
| 26 | + t.string "ssn", :limit => 64 |
| 27 | + t.integer "address_id", :precision => 38, :scale => 0 |
| 28 | + end |
| 29 | + |
| 30 | + create_table "people2", :force => true do |t| |
| 31 | + t.string "first_name" |
| 32 | + t.string "last_name" |
| 33 | + t.string "ssn", :limit => 64 |
| 34 | + end |
| 35 | + |
| 36 | + create_table "places", :force => true do |t| |
| 37 | + t.string "address", :limit => 2000 |
| 38 | + t.string "city" |
| 39 | + t.string "cstate" |
| 40 | + t.string "country", :limit => 2 |
| 41 | + end |
| 42 | + |
| 43 | + create_view "v_people", "select id, first_name, last_name, ssn, address_id from people", :force => true do |v| |
| 44 | + v.column :id |
| 45 | + v.column :f_name |
| 46 | + v.column :l_name |
| 47 | + v.column :social_security |
| 48 | + v.column :address_id |
| 49 | + end |
| 50 | + |
| 51 | +end |
0 commit comments