add table Champs
This commit is contained in:
parent
2050465a75
commit
56eccf55df
10 changed files with 45 additions and 2 deletions
9
db/migrate/20151103091603_create_champs.rb
Normal file
9
db/migrate/20151103091603_create_champs.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
class CreateChamps < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :champs do |t|
|
||||
t.string :value
|
||||
end
|
||||
add_reference :champs, :type_de_champs, references: :types_de_champs
|
||||
add_reference :champs, :dossier, references: :dossiers
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20151102163051) do
|
||||
ActiveRecord::Schema.define(version: 20151103091603) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
@ -41,6 +41,12 @@ ActiveRecord::Schema.define(version: 20151102163051) do
|
|||
|
||||
add_index "cerfas", ["dossier_id"], name: "index_cerfas_on_dossier_id", using: :btree
|
||||
|
||||
create_table "champs", force: :cascade do |t|
|
||||
t.string "value"
|
||||
t.integer "type_de_champs_id"
|
||||
t.integer "dossier_id"
|
||||
end
|
||||
|
||||
create_table "commentaires", force: :cascade do |t|
|
||||
t.string "email"
|
||||
t.datetime "created_at", null: false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue