diff options
| author | Luc Donnet | 2012-02-15 12:19:35 +0100 | 
|---|---|---|
| committer | Luc Donnet | 2012-02-15 12:19:35 +0100 | 
| commit | dfd08c9868942f31040f1518a09500ef398e4509 (patch) | |
| tree | 8d632b0d382fa0ed75872fdc41cca7cea4c185de /db | |
| parent | 3acd3ee699ec4f049d9ef204ab58d9488039a7ee (diff) | |
| download | chouette-core-dfd08c9868942f31040f1518a09500ef398e4509.tar.bz2 | |
Add network and company model
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrate/20120214101458_create_chouette_company.rb | 25 | ||||
| -rw-r--r-- | db/migrate/20120214101645_create_chouette_ptnetwork.rb | 23 | ||||
| -rw-r--r-- | db/schema.rb | 58 | 
3 files changed, 105 insertions, 1 deletions
diff --git a/db/migrate/20120214101458_create_chouette_company.rb b/db/migrate/20120214101458_create_chouette_company.rb new file mode 100644 index 000000000..5a15a26e6 --- /dev/null +++ b/db/migrate/20120214101458_create_chouette_company.rb @@ -0,0 +1,25 @@ +class CreateChouetteCompany < ActiveRecord::Migration +  def up +    create_table "company", :force => true do |t| +      t.string   "objectid" +      t.integer  "objectversion" +      t.datetime "creationtime" +      t.string   "creatorid" +      t.string   "name" +      t.string   "shortname" +      t.string   "organizationalunit" +      t.string   "operatingdepartmentname" +      t.string   "code" +      t.string   "phone" +      t.string   "fax" +      t.string   "email" +      t.string   "registrationnumber" +    end + +    add_index "company", ["objectid"], :name => "company_objectid_key", :unique => true +    add_index "company", ["registrationnumber"], :name => "company_registrationnumber_key", :unique => true +  end + +  def down +  end +end diff --git a/db/migrate/20120214101645_create_chouette_ptnetwork.rb b/db/migrate/20120214101645_create_chouette_ptnetwork.rb new file mode 100644 index 000000000..13f294345 --- /dev/null +++ b/db/migrate/20120214101645_create_chouette_ptnetwork.rb @@ -0,0 +1,23 @@ +class CreateChouettePtnetwork < ActiveRecord::Migration +  def up +    create_table "ptnetwork", :force => true do |t| +      t.string   "objectid" +      t.integer  "objectversion" +      t.datetime "creationtime" +      t.string   "creatorid" +      t.date     "versiondate" +      t.string   "description" +      t.string   "name" +      t.string   "registrationnumber" +      t.string   "sourcename" +      t.string   "sourceidentifier" +      t.string   "comment" +    end + +    add_index "ptnetwork", ["objectid"], :name => "ptnetwork_objectid_key", :unique => true +    add_index "ptnetwork", ["registrationnumber"], :name => "ptnetwork_registrationnumber_key", :unique => true +  end + +  def down +  end +end diff --git a/db/schema.rb b/db/schema.rb index 2740b6590..4b3e892f5 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,63 @@  #  # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20120126110946) do +ActiveRecord::Schema.define(:version => 20120214101645) do + +  create_table "company", :force => true do |t| +    t.string   "objectid" +    t.integer  "objectversion" +    t.datetime "creationtime" +    t.string   "creatorid" +    t.string   "name" +    t.string   "shortname" +    t.string   "organizationalunit" +    t.string   "operatingdepartmentname" +    t.string   "code" +    t.string   "phone" +    t.string   "fax" +    t.string   "email" +    t.string   "registrationnumber" +  end + +  add_index "company", ["objectid"], :name => "company_objectid_key", :unique => true +  add_index "company", ["registrationnumber"], :name => "company_registrationnumber_key", :unique => true + +  create_table "line", :force => true do |t| +    t.integer  "ptnetworkid",                :limit => 8 +    t.integer  "companyid",                  :limit => 8 +    t.string   "objectid" +    t.integer  "objectversion" +    t.datetime "creationtime" +    t.string   "creatorid" +    t.string   "name" +    t.string   "number" +    t.string   "publishedname" +    t.string   "transportmodename" +    t.string   "registrationnumber" +    t.string   "comment" +    t.boolean  "mobilityrestrictedsuitable" +    t.integer  "userneeds",                  :limit => 8 +  end + +  add_index "line", ["objectid"], :name => "line_objectid_key", :unique => true +  add_index "line", ["registrationnumber"], :name => "line_registrationnumber_key", :unique => true + +  create_table "ptnetwork", :force => true do |t| +    t.string   "objectid" +    t.integer  "objectversion" +    t.datetime "creationtime" +    t.string   "creatorid" +    t.date     "versiondate" +    t.string   "description" +    t.string   "name" +    t.string   "registrationnumber" +    t.string   "sourcename" +    t.string   "sourceidentifier" +    t.string   "comment" +  end + +  add_index "ptnetwork", ["objectid"], :name => "ptnetwork_objectid_key", :unique => true +  add_index "ptnetwork", ["registrationnumber"], :name => "ptnetwork_registrationnumber_key", :unique => true    create_table "referentials", :force => true do |t|      t.string   "name"  | 
