migration
This commit is contained in:
parent
37b38eca84
commit
0b91dcd816
17
db/migrate/20180301174625_create_sub_products.rb
Normal file
17
db/migrate/20180301174625_create_sub_products.rb
Normal file
@ -0,0 +1,17 @@
|
||||
class CreateSubProducts < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :sub_products do |t|
|
||||
t.integer :product_id
|
||||
t.string :name
|
||||
t.text :description
|
||||
t.decimal :price_ht, precision: 10, scale: 2
|
||||
t.decimal :price_ht_total, precision: 10, scale: 2
|
||||
t.decimal :qte, precision: 10, scale: 2
|
||||
t.integer :product_order_product_id
|
||||
t.integer :fournisseur_id
|
||||
t.string :reference
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
12
db/migrate/20180301174759_create_fournisseurs.rb
Normal file
12
db/migrate/20180301174759_create_fournisseurs.rb
Normal file
@ -0,0 +1,12 @@
|
||||
class CreateFournisseurs < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :fournisseurs do |t|
|
||||
t.string :name
|
||||
t.text :description
|
||||
t.string :iban
|
||||
t.string :bic
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,6 @@
|
||||
class AddSubProductReferenceIdToSubProducts < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :sub_products, :sub_product_reference_id, :integer
|
||||
add_column :sub_products, :archived, :boolean
|
||||
end
|
||||
end
|
@ -0,0 +1,7 @@
|
||||
class AddShipedToProductOrders < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :product_orders, :shiped, :boolean
|
||||
|
||||
#add_column :product_orders, :paid_at, :datetime
|
||||
end
|
||||
end
|
28
db/schema.rb
28
db/schema.rb
@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20180209010600) do
|
||||
ActiveRecord::Schema.define(version: 20180301225428) do
|
||||
|
||||
create_table "abonnements", force: :cascade do |t|
|
||||
t.integer "abonnement_type_id", limit: 4
|
||||
@ -371,6 +371,15 @@ ActiveRecord::Schema.define(version: 20180209010600) do
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "fournisseurs", force: :cascade do |t|
|
||||
t.string "name", limit: 255
|
||||
t.text "description", limit: 65535
|
||||
t.string "iban", limit: 255
|
||||
t.string "bic", limit: 255
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "gallery_contents", force: :cascade do |t|
|
||||
t.string "name", limit: 255
|
||||
t.text "description", limit: 65535
|
||||
@ -889,6 +898,7 @@ ActiveRecord::Schema.define(version: 20180209010600) do
|
||||
t.string "bl_number", limit: 255
|
||||
t.integer "bl_index", limit: 4
|
||||
t.integer "bl_year", limit: 4
|
||||
t.boolean "shiped", limit: 1
|
||||
end
|
||||
|
||||
create_table "product_product_sizes", force: :cascade do |t|
|
||||
@ -973,6 +983,22 @@ ActiveRecord::Schema.define(version: 20180209010600) do
|
||||
|
||||
add_index "sessions", ["updated_at"], name: "index_sessions_on_updated_at", using: :btree
|
||||
|
||||
create_table "sub_products", force: :cascade do |t|
|
||||
t.integer "product_id", limit: 4
|
||||
t.string "name", limit: 255
|
||||
t.text "description", limit: 65535
|
||||
t.decimal "price_ht", precision: 10, scale: 2
|
||||
t.decimal "price_ht_total", precision: 10, scale: 2
|
||||
t.decimal "qte", precision: 10, scale: 2
|
||||
t.integer "product_order_product_id", limit: 4
|
||||
t.integer "fournisseur_id", limit: 4
|
||||
t.string "reference", limit: 255
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.integer "sub_product_reference_id", limit: 4
|
||||
t.boolean "archived", limit: 1
|
||||
end
|
||||
|
||||
create_table "table_contents", force: :cascade do |t|
|
||||
t.integer "style", limit: 4
|
||||
t.integer "nbr_rows", limit: 4
|
||||
|
Loading…
x
Reference in New Issue
Block a user