diff --git a/app/views/admin/dashboards/commercial.html.haml b/app/views/admin/dashboards/commercial.html.haml index 1a3e160..136cf8f 100644 --- a/app/views/admin/dashboards/commercial.html.haml +++ b/app/views/admin/dashboards/commercial.html.haml @@ -911,7 +911,7 @@ %th %tbody - /* 11:18:50 localhost arcom_app */ SELECT COUNT(1) FROM `order_hist_lines`; + /* 11:18:50 localhost phone_app */ SELECT COUNT(1) FROM `order_hist_lines`; -#@periode_price_lines.select("p_product_ref_id, SUM(cc_tot_amount_ht) AS cc_tot_amount_ht, SUM(cc_weight_tot) AS cc_weight_tot, ((SELECT weight FROM `p_product_refs` WHERE id = price_lines.p_product_ref_id )) AS price_per_kg").group(:p_product_ref_id).order("cc_tot_amount_ht DESC").each do |ppp| @@ -1017,7 +1017,7 @@ %th %tbody - /* 11:18:50 localhost arcom_app */ SELECT COUNT(1) FROM `order_hist_lines`; + /* 11:18:50 localhost phone_app */ SELECT COUNT(1) FROM `order_hist_lines`; -#@periode_price_lines.select("p_product_ref_id, SUM(tot_amount_ht) AS tot_amount_ht, SUM(weight_tot) AS weight_tot, ((SELECT weight FROM `p_product_refs` WHERE id = price_lines.p_product_ref_id )) AS price_per_kg").group(:p_product_ref_id).order("tot_amount_ht DESC").each do |ppp| @@ -1099,7 +1099,7 @@ %tbody - /* 11:18:50 localhost arcom_app */ SELECT COUNT(1) FROM `order_hist_lines`; + /* 11:18:50 localhost phone_app */ SELECT COUNT(1) FROM `order_hist_lines`; -#@periode_price_lines.select("p_product_ref_id, SUM(cc_tot_amount_ht) AS cc_tot_amount_ht, SUM(cc_weight_tot) AS cc_weight_tot, ((SELECT weight FROM `p_product_refs` WHERE id = price_lines.p_product_ref_id )) AS price_per_kg").group(:p_product_ref_id).order("cc_tot_amount_ht DESC").each do |ppp| @@ -1168,7 +1168,7 @@ %th %tbody - /* 11:18:50 localhost arcom_app */ SELECT COUNT(1) FROM `order_hist_lines`; + /* 11:18:50 localhost phone_app */ SELECT COUNT(1) FROM `order_hist_lines`; -#@periode_price_lines.select("p_product_ref_id, SUM(cc_tot_amount_ht) AS cc_tot_amount_ht, SUM(cc_weight_tot) AS cc_weight_tot, ((SELECT weight FROM `p_product_refs` WHERE id = price_lines.p_product_ref_id )) AS price_per_kg").group(:p_product_ref_id).order("cc_tot_amount_ht DESC").each do |ppp| @@ -1266,7 +1266,7 @@ %th.numeraire CA Moyen famille / client %tbody - /* 11:18:50 localhost arcom_app */ SELECT COUNT(1) FROM `order_hist_lines`; + /* 11:18:50 localhost phone_app */ SELECT COUNT(1) FROM `order_hist_lines`; -#@periode_price_lines.select("p_product_ref_id, SUM(cc_tot_amount_ht) AS cc_tot_amount_ht, SUM(cc_weight_tot) AS cc_weight_tot, ((SELECT weight FROM `p_product_refs` WHERE id = price_lines.p_product_ref_id )) AS price_per_kg").group(:p_product_ref_id).order("cc_tot_amount_ht DESC").each do |ppp| @@ -1362,7 +1362,7 @@ %th.numeraire CA Moyen famille / client %tbody - /* 11:18:50 localhost arcom_app */ SELECT COUNT(1) FROM `order_hist_lines`; + /* 11:18:50 localhost phone_app */ SELECT COUNT(1) FROM `order_hist_lines`; -#@periode_price_lines.select("p_product_ref_id, SUM(cc_tot_amount_ht) AS cc_tot_amount_ht, SUM(cc_weight_tot) AS cc_weight_tot, ((SELECT weight FROM `p_product_refs` WHERE id = price_lines.p_product_ref_id )) AS price_per_kg").group(:p_product_ref_id).order("cc_tot_amount_ht DESC").each do |ppp| diff --git a/app/views/layouts/admin.html.haml b/app/views/layouts/admin.html.haml index dc31319..2594eaa 100644 --- a/app/views/layouts/admin.html.haml +++ b/app/views/layouts/admin.html.haml @@ -27,7 +27,7 @@ %body.admin{:id => "body_#{@qi_menu_active}"} #right_bar - =link_to image_tag("/logo-arcom.png"), "/", :id => "logo" + =link_to image_tag("/logo-prestaphone.png"), "/", :id => "logo" -if current_admin diff --git a/config/cable.yml b/config/cable.yml index 8a27c23..a5aac6e 100644 --- a/config/cable.yml +++ b/config/cable.yml @@ -7,4 +7,4 @@ test: production: adapter: redis url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> - channel_prefix: arcom_app_production + channel_prefix: phone_app_production diff --git a/config/database.yml b/config/database.yml index 2102f7c..7942cbe 100644 --- a/config/database.yml +++ b/config/database.yml @@ -5,17 +5,16 @@ # gem 'sqlite3' # default: &default - adapter: mysql2 - encoding: utf8mb4 - database: arcom_app + adapter: postgresql + encoding: unicode + database: phone_app pool: 5 timeout: 5000 - variables: - sql_mode: TRADITIONAL + development: adapter: postgresql - database: presta_app + database: phone_app pool: 5 username: postgres @@ -24,11 +23,11 @@ development: # Do not set this db to the same as development or production. test: <<: *default - database: db/test.sqlite3 + database: db/test production: <<: *default - database: arcom_app - username: arcom_app - password: arcom_app + database: phone_app + username: phone_app + password: phone_app socket: /var/run/mysqld/mysqld.sock diff --git a/config/deploy.rb b/config/deploy.rb index 5ede5a4..712edee 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -4,7 +4,7 @@ lock "~> 3.11.0" -set :application, 'arcom_app' +set :application, 'phone_app' set :domain, 'quartz-www02.sysnove.net' diff --git a/config/deploy/nginx.conf.erb b/config/deploy/nginx.conf.erb index f26c454..c7062af 100644 --- a/config/deploy/nginx.conf.erb +++ b/config/deploy/nginx.conf.erb @@ -1,18 +1,18 @@ -upstream arcom_app_unicorn { - server unix:/srv/www/web/arcom_app/shared/unicorn.sock fail_timeout=0; +upstream phone_app_unicorn { + server unix:/srv/www/web/phone_app/shared/unicorn.sock fail_timeout=0; } server { listen [::]:80; - server_name arcom_app.quartz.xyz ; - root /srv/www/web/arcom_app/current/public; + server_name phone_app.quartz.xyz ; + root /srv/www/web/phone_app/current/public; try_files $uri/index.html $uri @unicorn; location @unicorn { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; - proxy_pass http://arcom_app_unicorn; + proxy_pass http://phone_app_unicorn; proxy_read_timeout 6000; } diff --git a/config/deploy/production.rb b/config/deploy/production.rb index af2f022..a93e93c 100644 --- a/config/deploy/production.rb +++ b/config/deploy/production.rb @@ -121,7 +121,7 @@ namespace :deploy do sudo "service nginx reload" execute "cd #{current_path}" - execute "cd /srv/www/web/arcom_app/current; npm install" + execute "cd /srv/www/web/phone_app/current; npm install" end diff --git a/config/env_init b/config/env_init index bd7310b..01f58b4 100644 --- a/config/env_init +++ b/config/env_init @@ -1,7 +1,7 @@ APP_RUBY=2.6.0 ENV=production -APP_ROOT=/srv/www/web/arcom_app/current/ +APP_ROOT=/srv/www/web/phone_app/current/ GEM_HOME=/srv/www/web/.rvm/gems/ruby-$APP_RUBY UNICORN_OPTS="-D -E ${ENV} -c ${APP_ROOT}/config/unicorn.rb" diff --git a/config/environments/production.rb b/config/environments/production.rb index 362c0f0..d47ccb0 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -61,7 +61,7 @@ Rails.application.configure do # Use a real queuing backend for Active Job (and separate queues per environment). # config.active_job.queue_adapter = :resque - # config.active_job.queue_name_prefix = "arcom_app_production" + # config.active_job.queue_name_prefix = "phone_app_production" config.action_mailer.perform_caching = false diff --git a/config/nginx.conf b/config/nginx.conf index 1e12e16..7dd90cc 100644 --- a/config/nginx.conf +++ b/config/nginx.conf @@ -1,6 +1,6 @@ -upstream arcom_app_unicorn { - server unix:/srv/www/web/arcom_app/shared/unicorn.sock fail_timeout=0; +upstream phone_app_unicorn { + server unix:/srv/www/web/phone_app/shared/unicorn.sock fail_timeout=0; } @@ -10,15 +10,15 @@ upstream arcom_app_unicorn { server { listen [::]:443 ssl; - server_name arcom.basiclabs.fr; - root /srv/www/web/arcom_app/current/public; + server_name prestaphone.basiclabs.fr; + root /srv/www/web/phone_app/current/public; try_files $uri/index.html $uri @unicorn; location @unicorn { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; #proxy_redirect off; - proxy_pass http://arcom_app_unicorn; + proxy_pass http://phone_app_unicorn; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -36,8 +36,8 @@ server { keepalive_timeout 10; ssl on; - ssl_certificate /etc/letsencrypt/live/arcom.basiclabs.fr/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/arcom.basiclabs.fr/privkey.pem; + ssl_certificate /etc/letsencrypt/live/prestaphone.basiclabs.fr/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/prestaphone.basiclabs.fr/privkey.pem; include snippets/letsencrypt.conf; diff --git a/config/qi.yml b/config/qi.yml index 46f4169..102e4bb 100644 --- a/config/qi.yml +++ b/config/qi.yml @@ -1,5 +1,5 @@ defaults: &defaults - site_name: arcom_app + site_name: phone_app dynamics_content: contact: "Formulaire contact" large_sub_menu: "Sous menu" diff --git a/config/unicorn.rb b/config/unicorn.rb index df35e2b..5f348e5 100644 --- a/config/unicorn.rb +++ b/config/unicorn.rb @@ -1,4 +1,4 @@ -@rails_app = "arcom_app" +@rails_app = "phone_app" working_directory "/srv/www/web/#{@rails_app}/current" pid "/srv/www/web/#{@rails_app}/shared/unicorn.pid" diff --git a/db/schema.rb b/db/schema.rb index 68d0a77..6662bd6 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -16,249 +16,249 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do enable_extension "plpgsql" create_table "accounting_zones", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.text "description" t.boolean "enabled", default: true - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "admin_admin_roles", force: :cascade do |t| t.bigint "admin_id" t.bigint "admin_role_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["admin_id"], name: "idx_53785_index_admin_admin_roles_on_admin_id" - t.index ["admin_role_id"], name: "idx_53785_index_admin_admin_roles_on_admin_role_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["admin_id"], name: "index_admin_admin_roles_on_admin_id" + t.index ["admin_role_id"], name: "index_admin_admin_roles_on_admin_role_id" end create_table "admin_permission_admin_roles", force: :cascade do |t| t.bigint "admin_permission_id" t.bigint "admin_role_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["admin_permission_id"], name: "idx_53803_index_admin_permission_admin_roles_on_admin_permissio" - t.index ["admin_role_id"], name: "idx_53803_index_admin_permission_admin_roles_on_admin_role_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["admin_permission_id"], name: "index_admin_permission_admin_roles_on_admin_permission_id" + t.index ["admin_role_id"], name: "index_admin_permission_admin_roles_on_admin_role_id" end create_table "admin_permissions", force: :cascade do |t| - t.string "name", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "code", limit: 255 - t.string "slug", limit: 255 - t.bigint "parent_id" - t.bigint "position" + t.string "name" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.string "code" + t.string "slug" + t.integer "parent_id" + t.integer "position" end create_table "admin_preferences", force: :cascade do |t| t.bigint "admin_id" - t.string "key", limit: 255 + t.string "key" t.text "value" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["admin_id"], name: "idx_53809_index_admin_preferences_on_admin_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["admin_id"], name: "index_admin_preferences_on_admin_id" end create_table "admin_roles", force: :cascade do |t| - t.string "name", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "name" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "admins", force: :cascade do |t| - t.string "name", limit: 255 - t.string "firstname", limit: 255 - t.string "avatar", limit: 255 - t.string "username", limit: 255, default: "" - t.string "email", limit: 255, default: "" - t.string "password_digest", limit: 255, default: "" - t.string "reset_password_token", limit: 255 + t.string "name" + t.string "firstname" + t.string "avatar" + t.string "username", default: "" + t.string "email", default: "" + t.string "password_digest", default: "" + t.string "reset_password_token" t.datetime "reset_password_sent_at" t.datetime "remember_created_at" - t.bigint "sign_in_count", default: 0 + t.integer "sign_in_count", default: 0 t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" - t.string "current_sign_in_ip", limit: 255 - t.string "last_sign_in_ip", limit: 255 - t.string "remember_token", limit: 255 - t.bigint "p_commercial_id" + t.string "current_sign_in_ip" + t.string "last_sign_in_ip" + t.string "remember_token" + t.integer "p_commercial_id" t.boolean "super_admin", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.bigint "societe_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.integer "societe_id" end create_table "albums", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.boolean "super_admin", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "block_contents", force: :cascade do |t| - t.bigint "style" - t.bigint "nbr_columns" - t.bigint "row1" - t.bigint "row2" - t.bigint "row3" - t.bigint "row4" + t.integer "style" + t.integer "nbr_columns" + t.integer "row1" + t.integer "row2" + t.integer "row3" + t.integer "row4" t.bigint "image_file_id" - t.bigint "margin_top" - t.bigint "margin_bottom" - t.bigint "margin_left" - t.bigint "margin_right" - t.bigint "padding_top" - t.bigint "padding_bottom" - t.bigint "padding_left" - t.bigint "padding_right" + t.integer "margin_top" + t.integer "margin_bottom" + t.integer "margin_left" + t.integer "margin_right" + t.integer "padding_top" + t.integer "padding_bottom" + t.integer "padding_left" + t.integer "padding_right" t.boolean "parallax", default: false t.boolean "center", default: false - t.bigint "center_width" - t.string "background_color", limit: 255 - t.string "gradient_start", limit: 255 - t.string "gradient_stop", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["image_file_id"], name: "idx_53852_index_block_contents_on_image_file_id" + t.integer "center_width" + t.string "background_color" + t.string "gradient_start" + t.string "gradient_stop" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["image_file_id"], name: "index_block_contents_on_image_file_id" end create_table "blocks", force: :cascade do |t| t.bigint "lang_site_id" - t.string "block_name", limit: 255 - t.string "blockable_type", limit: 255 + t.string "block_name" + t.string "blockable_type" t.bigint "blockable_id" t.text "content" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["blockable_id"], name: "idx_53841_index_blocks_on_blockable_id" - t.index ["lang_site_id"], name: "idx_53841_index_blocks_on_lang_site_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["blockable_id"], name: "index_blocks_on_blockable_id" + t.index ["lang_site_id"], name: "index_blocks_on_lang_site_id" end create_table "break_contents", force: :cascade do |t| t.boolean "line", default: false - t.bigint "height" - t.string "style", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "height" + t.string "style" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "categories", force: :cascade do |t| - t.string "name", limit: 255 - t.string "slug", limit: 255 + t.string "name" + t.string "slug" t.boolean "enabled", default: false t.text "description" - t.bigint "image_file_id" - t.bigint "position" + t.integer "image_file_id" + t.integer "position" t.bigint "parent_id" - t.string "permalink", limit: 255 + t.string "permalink" t.boolean "front_page", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["parent_id"], name: "idx_53874_index_categories_on_parent_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["parent_id"], name: "index_categories_on_parent_id" end create_table "category_categoryables", force: :cascade do |t| t.bigint "category_id" - t.string "categoryable_type", limit: 255 - t.bigint "categoryable_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["category_id"], name: "idx_53888_index_category_categoryables_on_category_id" + t.string "categoryable_type" + t.integer "categoryable_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["category_id"], name: "index_category_categoryables_on_category_id" end create_table "category_langs", force: :cascade do |t| - t.string "name", limit: 255 - t.string "slug", limit: 255 + t.string "name" + t.string "slug" t.text "description" - t.bigint "image_file_id" + t.integer "image_file_id" t.bigint "lang_site_id" t.bigint "category_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["category_id"], name: "idx_53895_index_category_langs_on_category_id" - t.index ["lang_site_id"], name: "idx_53895_index_category_langs_on_lang_site_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["category_id"], name: "index_category_langs_on_category_id" + t.index ["lang_site_id"], name: "index_category_langs_on_lang_site_id" end create_table "cel_tables", force: :cascade do |t| - t.bigint "position" - t.bigint "style" + t.integer "position" + t.integer "style" t.bigint "table_row_id" - t.bigint "table_content_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["table_row_id"], name: "idx_53906_index_cel_tables_on_table_row_id" + t.integer "table_content_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["table_row_id"], name: "index_cel_tables_on_table_row_id" end create_table "comments", force: :cascade do |t| - t.string "pseudo", limit: 255, default: "" - t.string "email", limit: 255, default: "" - t.string "website", limit: 255, default: "" + t.string "pseudo", default: "" + t.string "email", default: "" + t.string "website", default: "" t.boolean "enabled", default: false t.text "comment" - t.string "commentable_type", limit: 255 + t.string "commentable_type" t.bigint "commentable_id" - t.bigint "user_id" + t.integer "user_id" t.bigint "parent_id" t.boolean "notified", default: false t.datetime "notified_at" t.bigint "lang_site_id", default: 1 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["commentable_id"], name: "idx_53912_index_comments_on_commentable_id" - t.index ["lang_site_id"], name: "idx_53912_index_comments_on_lang_site_id" - t.index ["parent_id"], name: "idx_53912_index_comments_on_parent_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["commentable_id"], name: "index_comments_on_commentable_id" + t.index ["lang_site_id"], name: "index_comments_on_lang_site_id" + t.index ["parent_id"], name: "index_comments_on_parent_id" end create_table "contacts", force: :cascade do |t| - t.string "civilite", limit: 255 - t.string "firstname", limit: 255 - t.string "name", limit: 255 - t.string "address", limit: 255 - t.string "address2", limit: 255 - t.string "cp", limit: 255 - t.string "city", limit: 255 - t.string "country", limit: 255 - t.string "phone", limit: 255 - t.string "token", limit: 255 - t.string "email", limit: 255 - t.string "website", limit: 255 - t.bigint "raison_id" + t.string "civilite" + t.string "firstname" + t.string "name" + t.string "address" + t.string "address2" + t.string "cp" + t.string "city" + t.string "country" + t.string "phone" + t.string "token" + t.string "email" + t.string "website" + t.integer "raison_id" t.text "message" t.text "notes" - t.bigint "survey_set_id" - t.string "raison_text", limit: 255 + t.integer "survey_set_id" + t.string "raison_text" t.text "objet" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "data_file_categories", force: :cascade do |t| - t.string "name", limit: 255 - t.string "slug", limit: 255 - t.bigint "parent_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "name" + t.string "slug" + t.integer "parent_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "data_file_passwords", force: :cascade do |t| t.bigint "data_file_id" - t.string "token", limit: 255 + t.string "token" t.text "description" - t.bigint "nbr_downloads" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["data_file_id"], name: "idx_53980_index_data_file_passwords_on_data_file_id" + t.integer "nbr_downloads" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["data_file_id"], name: "index_data_file_passwords_on_data_file_id" end create_table "data_files", force: :cascade do |t| - t.string "file", limit: 255 - t.string "name", limit: 255 - t.string "slug", limit: 255 - t.string "token", limit: 255 - t.string "description", limit: 255 + t.string "file" + t.string "name" + t.string "slug" + t.string "token" + t.string "description" t.bigint "file_folder_id" - t.string "title", limit: 255 + t.string "title" t.text "long_desc" t.boolean "boutique", default: false t.bigint "data_file_category_id" @@ -268,261 +268,261 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.bigint "square_image_file_id" t.boolean "order_link", default: false t.boolean "download_link", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["data_file_category_id"], name: "idx_53950_index_data_files_on_data_file_category_id" - t.index ["file_folder_id"], name: "idx_53950_index_data_files_on_file_folder_id" - t.index ["image_file_id"], name: "idx_53950_index_data_files_on_image_file_id" - t.index ["square_image_file_id"], name: "idx_53950_index_data_files_on_square_image_file_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["data_file_category_id"], name: "index_data_files_on_data_file_category_id" + t.index ["file_folder_id"], name: "index_data_files_on_file_folder_id" + t.index ["image_file_id"], name: "index_data_files_on_image_file_id" + t.index ["square_image_file_id"], name: "index_data_files_on_square_image_file_id" end create_table "download_contents", force: :cascade do |t| - t.string "title", limit: 255 - t.string "style", limit: 255 + t.string "title" + t.string "style" t.text "description" t.bigint "data_file_id" t.boolean "boutique", default: false t.boolean "show_yumpu", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["data_file_id"], name: "idx_53990_index_download_contents_on_data_file_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["data_file_id"], name: "index_download_contents_on_data_file_id" end create_table "dynamic_contents", force: :cascade do |t| - t.string "name", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "name" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "edit_watchers", force: :cascade do |t| - t.string "element_type", limit: 255 - t.bigint "element_id" - t.string "key", limit: 255 + t.string "element_type" + t.integer "element_id" + t.string "key" t.bigint "admin_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["admin_id"], name: "idx_54010_index_edit_watchers_on_admin_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["admin_id"], name: "index_edit_watchers_on_admin_id" end create_table "export_hists", force: :cascade do |t| - t.string "piece", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "piece" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "external_links", force: :cascade do |t| - t.string "title", limit: 255 + t.string "title" t.text "description" - t.string "url", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "url" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "file_folders", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.boolean "super_admin", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "gallery_contents", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.text "description" - t.bigint "style" - t.bigint "nbr_img" + t.integer "style" + t.integer "nbr_img" t.boolean "with_legend", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "gallery_images", force: :cascade do |t| - t.string "title", limit: 255 + t.string "title" t.text "description" - t.string "tags", limit: 255 - t.bigint "position" + t.string "tags" + t.integer "position" t.bigint "image_file_id" t.bigint "gallery_content_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["gallery_content_id"], name: "idx_54058_index_gallery_images_on_gallery_content_id" - t.index ["image_file_id"], name: "idx_54058_index_gallery_images_on_image_file_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["gallery_content_id"], name: "index_gallery_images_on_gallery_content_id" + t.index ["image_file_id"], name: "index_gallery_images_on_image_file_id" end create_table "hashtaggings", force: :cascade do |t| t.bigint "hashtag_id" - t.string "hashtaggable_type", limit: 255 + t.string "hashtaggable_type" t.bigint "hashtaggable_id" - t.bigint "lang_site_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["hashtag_id"], name: "idx_54069_index_hashtaggings_on_hashtag_id" - t.index ["hashtaggable_id"], name: "idx_54069_index_hashtaggings_on_hashtaggable_id" + t.integer "lang_site_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["hashtag_id"], name: "index_hashtaggings_on_hashtag_id" + t.index ["hashtaggable_id"], name: "index_hashtaggings_on_hashtaggable_id" end create_table "hashtags", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.boolean "enabled", default: false - t.bigint "lang_site_id" - t.string "slug", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "lang_site_id" + t.string "slug" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "html_contents", force: :cascade do |t| t.text "content" - t.string "style", limit: 255 - t.string "content_type", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "style" + t.string "content_type" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "i_task_projects", force: :cascade do |t| - t.string "name", limit: 255 - t.string "slug", limit: 255 + t.string "name" + t.string "slug" t.bigint "admin_id" t.text "description" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["admin_id"], name: "idx_54203_index_i_task_projects_on_admin_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["admin_id"], name: "index_i_task_projects_on_admin_id" end create_table "i_tasks", force: :cascade do |t| t.bigint "i_task_project_id" - t.string "name", limit: 255 + t.string "name" t.text "descritpion" t.date "end_at" - t.bigint "image_file_id" + t.integer "image_file_id" t.boolean "done", default: false - t.bigint "minutes" + t.integer "minutes" t.bigint "admin_id" t.date "done_at" t.boolean "urgent", default: false - t.bigint "i_previ_id" - t.bigint "i_task_type_id" + t.integer "i_previ_id" + t.integer "i_task_type_id" t.boolean "from_customer", default: false - t.bigint "i_task_bill_state_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["admin_id"], name: "idx_54190_index_i_tasks_on_admin_id" - t.index ["i_task_project_id"], name: "idx_54190_index_i_tasks_on_i_task_project_id" + t.integer "i_task_bill_state_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["admin_id"], name: "index_i_tasks_on_admin_id" + t.index ["i_task_project_id"], name: "index_i_tasks_on_i_task_project_id" end create_table "image_contents", force: :cascade do |t| t.bigint "image_file_id" - t.bigint "width" - t.bigint "height" - t.string "alignement", limit: 255 + t.integer "width" + t.integer "height" + t.string "alignement" t.boolean "expandable", default: false - t.string "style", limit: 255 - t.string "alt", limit: 255 + t.string "style" + t.string "alt" t.bigint "cible_id" - t.string "cible_type", limit: 255 + t.string "cible_type" t.boolean "with_cible", default: false t.boolean "popup", default: false - t.bigint "margin_top" - t.bigint "margin_left" - t.bigint "margin_right" - t.bigint "margin_bottom" + t.integer "margin_top" + t.integer "margin_left" + t.integer "margin_right" + t.integer "margin_bottom" t.boolean "with_legend", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["cible_id"], name: "idx_54099_index_image_contents_on_cible_id" - t.index ["image_file_id"], name: "idx_54099_index_image_contents_on_image_file_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["cible_id"], name: "index_image_contents_on_cible_id" + t.index ["image_file_id"], name: "index_image_contents_on_image_file_id" end create_table "image_files", force: :cascade do |t| - t.string "file", limit: 255 - t.string "name", limit: 255 - t.string "slug", limit: 255 + t.string "file" + t.string "name" + t.string "slug" t.text "description" - t.string "tags", limit: 255 - t.bigint "album_id" - t.string "photograph", limit: 255 - t.string "cible_type", limit: 255 - t.bigint "cible_id" - t.string "origin_name", limit: 255 - t.string "token_s", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "tags" + t.integer "album_id" + t.string "photograph" + t.string "cible_type" + t.integer "cible_id" + t.string "origin_name" + t.string "token_s" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "import_csv_champs", force: :cascade do |t| - t.string "champ", limit: 255 - t.string "header", limit: 255 - t.string "value", limit: 255 + t.string "champ" + t.string "header" + t.string "value" t.bigint "import_csv_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["import_csv_id"], name: "idx_54147_index_import_csv_champs_on_import_csv_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["import_csv_id"], name: "index_import_csv_champs_on_import_csv_id" end create_table "import_csv_elements", force: :cascade do |t| t.bigint "import_csv_id" - t.string "element_type", limit: 255 - t.bigint "element_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["import_csv_id"], name: "idx_54159_index_import_csv_elements_on_import_csv_id" + t.string "element_type" + t.integer "element_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["import_csv_id"], name: "index_import_csv_elements_on_import_csv_id" end create_table "import_csv_headers", force: :cascade do |t| t.bigint "import_csv_id" - t.string "name", limit: 255 - t.string "champ", limit: 255 + t.string "name" + t.string "champ" t.boolean "custom", default: true - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["import_csv_id"], name: "idx_54166_index_import_csv_headers_on_import_csv_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["import_csv_id"], name: "index_import_csv_headers_on_import_csv_id" end create_table "import_csvs", force: :cascade do |t| - t.string "file", limit: 255 + t.string "file" t.text "notes" t.boolean "imported", default: false - t.string "table_name", limit: 255 + t.string "table_name" t.datetime "imported_at" - t.string "token", limit: 255 - t.bigint "parent_id" - t.string "name", limit: 255 + t.string "token" + t.integer "parent_id" + t.string "name" t.text "description" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "ingredients", force: :cascade do |t| - t.string "name", limit: 255 - t.string "i_type", limit: 255 + t.string "name" + t.string "i_type" t.boolean "public", default: true - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "lang_articles", force: :cascade do |t| t.datetime "published_at" - t.string "title", limit: 255 - t.string "slug", limit: 255 + t.string "title" + t.string "slug" t.text "description" t.text "keywords" t.boolean "enabled", default: false t.bigint "image_file_id" t.boolean "title_cached", default: false - t.string "tags_cache", limit: 255 - t.string "tags_cache_slug", limit: 255 + t.string "tags_cache" + t.string "tags_cache_slug" t.bigint "lang_site_id" t.bigint "article_id" - t.string "html_title", limit: 255 - t.string "fb_title", limit: 255 - t.string "twitter_title", limit: 255 + t.string "html_title" + t.string "fb_title" + t.string "twitter_title" t.text "twitter_description" - t.bigint "without_text_image_file_id" + t.integer "without_text_image_file_id" t.bigint "slider_image_file_id" t.text "chapeau" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["article_id"], name: "idx_54214_index_lang_articles_on_article_id" - t.index ["image_file_id"], name: "idx_54214_index_lang_articles_on_image_file_id" - t.index ["lang_site_id"], name: "idx_54214_index_lang_articles_on_lang_site_id" - t.index ["slider_image_file_id"], name: "idx_54214_index_lang_articles_on_slider_image_file_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["article_id"], name: "index_lang_articles_on_article_id" + t.index ["image_file_id"], name: "index_lang_articles_on_image_file_id" + t.index ["lang_site_id"], name: "index_lang_articles_on_lang_site_id" + t.index ["slider_image_file_id"], name: "index_lang_articles_on_slider_image_file_id" end create_table "lang_pages", force: :cascade do |t| @@ -531,22 +531,22 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.text "title" t.text "description" t.text "keywords" - t.string "twitter_title", limit: 255 + t.string "twitter_title" t.text "twitter_description" t.bigint "without_text_image_file_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["lang_site_id"], name: "idx_54232_index_lang_pages_on_lang_site_id" - t.index ["page_id"], name: "idx_54232_index_lang_pages_on_page_id" - t.index ["without_text_image_file_id"], name: "idx_54232_index_lang_pages_on_without_text_image_file_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["lang_site_id"], name: "index_lang_pages_on_lang_site_id" + t.index ["page_id"], name: "index_lang_pages_on_page_id" + t.index ["without_text_image_file_id"], name: "index_lang_pages_on_without_text_image_file_id" end create_table "lang_sites", force: :cascade do |t| - t.string "name", limit: 255 - t.string "slug", limit: 255 + t.string "name" + t.string "slug" t.boolean "enabled", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "line_stock_usages", force: :cascade do |t| @@ -556,10 +556,10 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.decimal "ac_price_u_ht", precision: 14, scale: 2 t.decimal "cc_price_ht", precision: 14, scale: 2 t.decimal "ac_price_ht", precision: 14, scale: 2 - t.bigint "dest_line_stock_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["line_stock_id"], name: "idx_54286_index_line_stock_usages_on_line_stock_id" + t.integer "dest_line_stock_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["line_stock_id"], name: "index_line_stock_usages_on_line_stock_id" end create_table "line_stocks", force: :cascade do |t| @@ -569,16 +569,16 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.decimal "qte_available", precision: 14, scale: 2 t.decimal "qte_used", precision: 14, scale: 2 t.decimal "price_ht", precision: 14, scale: 2 - t.bigint "price_line_block_id" - t.bigint "price_line_id" - t.string "stockable_type", limit: 255 - t.bigint "stockable_id" + t.integer "price_line_block_id" + t.integer "price_line_id" + t.string "stockable_type" + t.integer "stockable_id" t.datetime "date" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "ac_line_type", limit: 255 - t.string "cc_line_type", limit: 255 - t.bigint "stock_movement_line_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.string "ac_line_type" + t.string "cc_line_type" + t.integer "stock_movement_line_id" t.decimal "cc_price_ht_available", precision: 14, scale: 2 t.decimal "cc_price_ht_used", precision: 14, scale: 2 t.decimal "cc_price_u_ht", precision: 14, scale: 2 @@ -596,279 +596,279 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.decimal "ac_qte_kg_available", precision: 14, scale: 2 t.decimal "ac_qte_kg_used", precision: 14, scale: 2 t.date "dluo" - t.bigint "partition_line_id" - t.index ["p_product_ref_id"], name: "idx_54254_index_line_stocks_on_p_product_ref_id" + t.integer "partition_line_id" + t.index ["p_product_ref_id"], name: "index_line_stocks_on_p_product_ref_id" end create_table "link_contents", force: :cascade do |t| - t.bigint "type" - t.string "name", limit: 255 - t.string "title", limit: 255 + t.integer "type" + t.string "name" + t.string "title" t.boolean "popup", default: false - t.string "url", limit: 255 - t.string "style", limit: 255 + t.string "url" + t.string "style" t.bigint "cible_id" - t.string "cible_type", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["cible_id"], name: "idx_54297_index_link_contents_on_cible_id" + t.string "cible_type" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["cible_id"], name: "index_link_contents_on_cible_id" end create_table "mail_contents", force: :cascade do |t| t.bigint "lang_site_id" t.bigint "mail_type_id" - t.string "subject", limit: 255 + t.string "subject" t.text "message" t.boolean "enabled", default: false - t.string "content_type", limit: 255 + t.string "content_type" t.text "tags" t.bigint "mail_template_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["lang_site_id"], name: "idx_54312_index_mail_contents_on_lang_site_id" - t.index ["mail_template_id"], name: "idx_54312_index_mail_contents_on_mail_template_id" - t.index ["mail_type_id"], name: "idx_54312_index_mail_contents_on_mail_type_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["lang_site_id"], name: "index_mail_contents_on_lang_site_id" + t.index ["mail_template_id"], name: "index_mail_contents_on_mail_template_id" + t.index ["mail_type_id"], name: "index_mail_contents_on_mail_type_id" end create_table "mail_hists", force: :cascade do |t| t.bigint "lang_site_id" - t.string "from_email", limit: 255 - t.string "to_email", limit: 255 - t.string "subject", limit: 255 + t.string "from_email" + t.string "to_email" + t.string "subject" t.text "body" - t.string "subject_send", limit: 255 + t.string "subject_send" t.text "body_send" t.bigint "mail_content_id" t.bigint "mail_type_id" - t.string "element_type", limit: 255 - t.bigint "element_id" - t.bigint "w_biker_id" + t.string "element_type" + t.integer "element_id" + t.integer "w_biker_id" t.boolean "mj_read" - t.string "mj_token", limit: 255 - t.bigint "nbr_send" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.bigint "v_bda_id" - t.bigint "v_contact_id" - t.bigint "societe_id" - t.index ["lang_site_id"], name: "idx_54324_index_mail_hists_on_lang_site_id" - t.index ["mail_content_id"], name: "idx_54324_index_mail_hists_on_mail_content_id" - t.index ["mail_type_id"], name: "idx_54324_index_mail_hists_on_mail_type_id" + t.string "mj_token" + t.integer "nbr_send" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.integer "v_bda_id" + t.integer "v_contact_id" + t.integer "societe_id" + t.index ["lang_site_id"], name: "index_mail_hists_on_lang_site_id" + t.index ["mail_content_id"], name: "index_mail_hists_on_mail_content_id" + t.index ["mail_type_id"], name: "index_mail_hists_on_mail_type_id" end create_table "mail_profiles", force: :cascade do |t| - t.string "civilite", limit: 255 - t.string "firstname", limit: 255 - t.string "name", limit: 255 - t.string "address", limit: 255 - t.string "address2", limit: 255 - t.string "cp", limit: 255 - t.string "city", limit: 255 - t.string "country", limit: 255 - t.string "email", limit: 255 - t.string "phone", limit: 255 - t.string "token", limit: 255 - t.string "provider", limit: 255 - t.string "uid", limit: 255 - t.string "facebook_token", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "civilite" + t.string "firstname" + t.string "name" + t.string "address" + t.string "address2" + t.string "cp" + t.string "city" + t.string "country" + t.string "email" + t.string "phone" + t.string "token" + t.string "provider" + t.string "uid" + t.string "facebook_token" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "mail_templates", force: :cascade do |t| - t.string "title", limit: 255 + t.string "title" t.text "template_html" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "mail_types", force: :cascade do |t| - t.string "slug", limit: 255 - t.string "default_title", limit: 255 + t.string "slug" + t.string "default_title" t.text "default_message" t.bigint "mail_type_reference_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["mail_type_reference_id"], name: "idx_54372_index_mail_types_on_mail_type_reference_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["mail_type_reference_id"], name: "index_mail_types_on_mail_type_reference_id" end create_table "map_contents", force: :cascade do |t| - t.string "address", limit: 255 - t.string "name", limit: 255 - t.bigint "view" + t.string "address" + t.string "name" + t.integer "view" t.boolean "info_bule", default: false - t.bigint "zoom" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "zoom" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "market_discounts", force: :cascade do |t| - t.decimal "min", precision: 10 - t.decimal "max", precision: 10 - t.decimal "percent", precision: 10 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.bigint "p_customer_cat_id", default: 1 + t.decimal "min" + t.decimal "max" + t.decimal "percent" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.integer "p_customer_cat_id", default: 1 end create_table "menu_aliases", force: :cascade do |t| t.bigint "menu_item_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["menu_item_id"], name: "idx_54417_index_menu_aliases_on_menu_item_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["menu_item_id"], name: "index_menu_aliases_on_menu_item_id" end create_table "menu_item_articles", force: :cascade do |t| t.bigint "menu_item_id" t.bigint "article_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["article_id"], name: "idx_54449_index_menu_item_articles_on_article_id" - t.index ["menu_item_id"], name: "idx_54449_index_menu_item_articles_on_menu_item_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["article_id"], name: "index_menu_item_articles_on_article_id" + t.index ["menu_item_id"], name: "index_menu_item_articles_on_menu_item_id" end create_table "menu_item_categories", force: :cascade do |t| t.bigint "menu_item_id" t.bigint "category_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["category_id"], name: "idx_54455_index_menu_item_categories_on_category_id" - t.index ["menu_item_id"], name: "idx_54455_index_menu_item_categories_on_menu_item_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["category_id"], name: "index_menu_item_categories_on_category_id" + t.index ["menu_item_id"], name: "index_menu_item_categories_on_menu_item_id" end create_table "menu_item_langs", force: :cascade do |t| t.bigint "lang_site_id" - t.string "name", limit: 255 - t.string "slug", limit: 255 - t.string "permalink", limit: 255 + t.string "name" + t.string "slug" + t.string "permalink" t.boolean "enabled", default: false t.boolean "visible", default: false t.bigint "menu_item_id" t.bigint "image_file_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["image_file_id"], name: "idx_54461_index_menu_item_langs_on_image_file_id" - t.index ["lang_site_id"], name: "idx_54461_index_menu_item_langs_on_lang_site_id" - t.index ["menu_item_id"], name: "idx_54461_index_menu_item_langs_on_menu_item_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["image_file_id"], name: "index_menu_item_langs_on_image_file_id" + t.index ["lang_site_id"], name: "index_menu_item_langs_on_lang_site_id" + t.index ["menu_item_id"], name: "index_menu_item_langs_on_menu_item_id" end create_table "menu_item_link_contents", force: :cascade do |t| t.bigint "menu_item_id" t.bigint "image_file_id" - t.string "title", limit: 255 + t.string "title" t.text "description" - t.string "url", limit: 255 + t.string "url" t.boolean "popup", default: false - t.string "style", limit: 255 - t.string "block_type", limit: 255 + t.string "style" + t.string "block_type" t.bigint "cible_id" - t.string "cible_type", limit: 255 + t.string "cible_type" t.decimal "proportion", precision: 14, scale: 2 - t.bigint "level" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["cible_id"], name: "idx_54475_index_menu_item_link_contents_on_cible_id" - t.index ["image_file_id"], name: "idx_54475_index_menu_item_link_contents_on_image_file_id" - t.index ["menu_item_id"], name: "idx_54475_index_menu_item_link_contents_on_menu_item_id" + t.integer "level" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["cible_id"], name: "index_menu_item_link_contents_on_cible_id" + t.index ["image_file_id"], name: "index_menu_item_link_contents_on_image_file_id" + t.index ["menu_item_id"], name: "index_menu_item_link_contents_on_menu_item_id" end create_table "menu_item_slug_histories", force: :cascade do |t| - t.string "permalink", limit: 255 - t.string "locale", limit: 255 - t.bigint "menu_item_id" + t.string "permalink" + t.string "locale" + t.integer "menu_item_id" t.bigint "menu_item_lang_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["menu_item_lang_id"], name: "idx_54491_index_menu_item_slug_histories_on_menu_item_lang_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["menu_item_lang_id"], name: "index_menu_item_slug_histories_on_menu_item_lang_id" end create_table "menu_item_tags", force: :cascade do |t| t.bigint "menu_item_id" t.bigint "tag_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["menu_item_id"], name: "idx_54502_index_menu_item_tags_on_menu_item_id" - t.index ["tag_id"], name: "idx_54502_index_menu_item_tags_on_tag_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["menu_item_id"], name: "index_menu_item_tags_on_menu_item_id" + t.index ["tag_id"], name: "index_menu_item_tags_on_tag_id" end create_table "menu_items", force: :cascade do |t| - t.string "name", limit: 255 - t.string "slug", limit: 255 - t.string "permalink", limit: 255 + t.string "name" + t.string "slug" + t.string "permalink" t.bigint "image_file_id" - t.string "section_name", limit: 255 - t.bigint "section_id" - t.string "repertoire_name", limit: 255 - t.bigint "repertoire_id" + t.string "section_name" + t.integer "section_id" + t.string "repertoire_name" + t.integer "repertoire_id" t.bigint "parent_id" - t.bigint "position" + t.integer "position" t.boolean "super_admin", default: false t.boolean "enabled", default: false t.boolean "visible", default: false t.boolean "deleted", default: false t.bigint "menu_id" t.bigint "menu_content_id" - t.string "menu_content_type", limit: 255 - t.bigint "archive_id" + t.string "menu_content_type" + t.integer "archive_id" t.boolean "archived", default: false t.datetime "archived_at" t.boolean "password", default: false t.boolean "comment", default: false t.boolean "sidebar", default: false t.boolean "title_image", default: false - t.string "title_image_style", limit: 255 + t.string "title_image_style" t.boolean "title_cached", default: false t.bigint "icon_image_file_id" t.bigint "icon_b_image_file_id" t.text "primary_description" t.bigint "icon_v_image_file_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["icon_b_image_file_id"], name: "idx_54423_index_menu_items_on_icon_b_image_file_id" - t.index ["icon_image_file_id"], name: "idx_54423_index_menu_items_on_icon_image_file_id" - t.index ["icon_v_image_file_id"], name: "idx_54423_index_menu_items_on_icon_v_image_file_id" - t.index ["image_file_id"], name: "idx_54423_index_menu_items_on_image_file_id" - t.index ["menu_content_id"], name: "idx_54423_index_menu_items_on_menu_content_id" - t.index ["menu_id"], name: "idx_54423_index_menu_items_on_menu_id" - t.index ["parent_id"], name: "idx_54423_index_menu_items_on_parent_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["icon_b_image_file_id"], name: "index_menu_items_on_icon_b_image_file_id" + t.index ["icon_image_file_id"], name: "index_menu_items_on_icon_image_file_id" + t.index ["icon_v_image_file_id"], name: "index_menu_items_on_icon_v_image_file_id" + t.index ["image_file_id"], name: "index_menu_items_on_image_file_id" + t.index ["menu_content_id"], name: "index_menu_items_on_menu_content_id" + t.index ["menu_id"], name: "index_menu_items_on_menu_id" + t.index ["parent_id"], name: "index_menu_items_on_parent_id" end create_table "menu_urls", force: :cascade do |t| - t.string "url", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "url" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "menus", force: :cascade do |t| - t.string "name", limit: 255 - t.string "max_levels", limit: 255 - t.string "slug", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "name" + t.string "max_levels" + t.string "slug" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "open_range_elements", force: :cascade do |t| - t.bigint "open_range_id" - t.string "element_type", limit: 255 - t.bigint "element_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "open_range_id" + t.string "element_type" + t.integer "element_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "open_ranges", force: :cascade do |t| - t.string "name", limit: 255 - t.bigint "position" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "name" + t.integer "position" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "order_hist_lines", force: :cascade do |t| - t.string "past_code_client", limit: 255 - t.string "numero_piece", limit: 255 - t.string "numerofacture", limit: 255 - t.string "d_number", limit: 255 - t.bigint "position" - t.string "code_article", limit: 255 + t.string "past_code_client" + t.string "numero_piece" + t.string "numerofacture" + t.string "d_number" + t.integer "position" + t.string "code_article" t.bigint "p_product_ref_id" t.decimal "qte", precision: 14, scale: 2 t.decimal "prix_u", precision: 14, scale: 2 @@ -878,7 +878,7 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.decimal "remise_2", precision: 14, scale: 2 t.datetime "date_creation" t.datetime "date_modification" - t.string "compte_vente", limit: 255 + t.string "compte_vente" t.date "date_piece" t.date "date_facture" t.decimal "colisage", precision: 14, scale: 2 @@ -889,27 +889,27 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.decimal "quantite_origine", precision: 14, scale: 2 t.decimal "pu_tarif_origine", precision: 14, scale: 2 t.decimal "taux_tva_article_2", precision: 14, scale: 2 - t.string "compte_ventil_vente", limit: 255 - t.bigint "num_ligne_avancement" - t.bigint "etat" - t.string "reference_1", limit: 255 - t.string "reference_2", limit: 255 - t.string "reference_3", limit: 255 - t.string "reference_4", limit: 255 - t.string "code_mode_reglement", limit: 255 + t.string "compte_ventil_vente" + t.integer "num_ligne_avancement" + t.integer "etat" + t.string "reference_1" + t.string "reference_2" + t.string "reference_3" + t.string "reference_4" + t.string "code_mode_reglement" t.bigint "p_payment_type_id" - t.bigint "echeance_nbr_jour" + t.integer "echeance_nbr_jour" t.date "date_echeance" - t.string "code_commercial", limit: 255 + t.string "code_commercial" t.bigint "p_commercial_id" t.decimal "taux_escompte", precision: 14, scale: 2 t.decimal "taux_remise", precision: 14, scale: 2 - t.string "fichier_archive", limit: 255 - t.string "interlocuteur", limit: 255 - t.string "new_code_client", limit: 255 + t.string "fichier_archive" + t.string "interlocuteur" + t.string "new_code_client" t.bigint "p_customer_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false t.decimal "cc_montant_ht", precision: 14, scale: 2 t.decimal "cc_montant_ht_remise", precision: 14, scale: 2 t.decimal "cc_montant_ht_com", precision: 14, scale: 2 @@ -933,25 +933,25 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.bigint "order_hist_id" t.decimal "montant_ht", precision: 14, scale: 3 t.decimal "montant_ht_remise", precision: 14, scale: 3 - t.index ["order_hist_id"], name: "idx_54552_index_order_hist_lines_on_order_hist_id" - t.index ["p_commercial_id"], name: "idx_54552_index_order_hist_lines_on_p_commercial_id" - t.index ["p_customer_id"], name: "idx_54552_index_order_hist_lines_on_p_customer_id" - t.index ["p_payment_type_id"], name: "idx_54552_index_order_hist_lines_on_p_payment_type_id" - t.index ["p_product_ref_id"], name: "idx_54552_index_order_hist_lines_on_p_product_ref_id" + t.index ["order_hist_id"], name: "index_order_hist_lines_on_order_hist_id" + t.index ["p_commercial_id"], name: "index_order_hist_lines_on_p_commercial_id" + t.index ["p_customer_id"], name: "index_order_hist_lines_on_p_customer_id" + t.index ["p_payment_type_id"], name: "index_order_hist_lines_on_p_payment_type_id" + t.index ["p_product_ref_id"], name: "index_order_hist_lines_on_p_product_ref_id" end create_table "order_hists", force: :cascade do |t| - t.string "past_code_client", limit: 255 - t.string "numero_piece", limit: 255 - t.string "numerofacture", limit: 255 - t.string "d_number", limit: 255 + t.string "past_code_client" + t.string "numero_piece" + t.string "numerofacture" + t.string "d_number" t.date "date_creation" t.date "date_modification" t.date "date_piece" t.date "date_facture" - t.bigint "p_payment_type_id" - t.bigint "p_commercial_id" - t.bigint "p_customer_id" + t.integer "p_payment_type_id" + t.integer "p_commercial_id" + t.integer "p_customer_id" t.decimal "montant_ht", precision: 14, scale: 2 t.decimal "montant_ht_remise", precision: 14, scale: 2 t.decimal "montant_ht_com", precision: 14, scale: 2 @@ -962,174 +962,174 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.decimal "marge_brut_hors_remise_pa", precision: 14, scale: 2 t.decimal "marge_brut_remise_pa", precision: 14, scale: 2 t.decimal "marge_net_ht_pa", precision: 14, scale: 2 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_aromes", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.boolean "public", default: true - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_article_serial_nums", force: :cascade do |t| t.bigint "p_article_id" t.bigint "p_serial_num_type_id" t.bigint "p_serial_num_value_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "value", limit: 255 - t.index ["p_article_id"], name: "idx_54961_index_p_article_serial_nums_on_p_article_id" - t.index ["p_serial_num_type_id"], name: "idx_54961_index_p_article_serial_nums_on_p_serial_num_type_id" - t.index ["p_serial_num_value_id"], name: "idx_54961_index_p_article_serial_nums_on_p_serial_num_value_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.string "value" + t.index ["p_article_id"], name: "index_p_article_serial_nums_on_p_article_id" + t.index ["p_serial_num_type_id"], name: "index_p_article_serial_nums_on_p_serial_num_type_id" + t.index ["p_serial_num_value_id"], name: "index_p_article_serial_nums_on_p_serial_num_value_id" end create_table "p_articles", force: :cascade do |t| t.bigint "p_product_ref_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false t.bigint "p_grade_id" - t.index ["p_grade_id"], name: "idx_54955_index_p_articles_on_p_grade_id" - t.index ["p_product_ref_id"], name: "idx_54955_index_p_articles_on_p_product_ref_id" + t.index ["p_grade_id"], name: "index_p_articles_on_p_grade_id" + t.index ["p_product_ref_id"], name: "index_p_articles_on_p_product_ref_id" end create_table "p_bank_accounts", force: :cascade do |t| t.bigint "p_bank_id" - t.string "iban", limit: 255 - t.string "bic", limit: 255 - t.string "compta_cpt", limit: 255 - t.string "compta_journ", limit: 255 - t.string "compta_aux", limit: 255 + t.string "iban" + t.string "bic" + t.string "compta_cpt" + t.string "compta_journ" + t.string "compta_aux" t.bigint "p_fournisseur_id" t.bigint "p_customer_id" t.boolean "owner", default: false t.bigint "data_file_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["data_file_id"], name: "idx_54979_index_p_bank_accounts_on_data_file_id" - t.index ["p_bank_id"], name: "idx_54979_index_p_bank_accounts_on_p_bank_id" - t.index ["p_customer_id"], name: "idx_54979_index_p_bank_accounts_on_p_customer_id" - t.index ["p_fournisseur_id"], name: "idx_54979_index_p_bank_accounts_on_p_fournisseur_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["data_file_id"], name: "index_p_bank_accounts_on_data_file_id" + t.index ["p_bank_id"], name: "index_p_bank_accounts_on_p_bank_id" + t.index ["p_customer_id"], name: "index_p_bank_accounts_on_p_customer_id" + t.index ["p_fournisseur_id"], name: "index_p_bank_accounts_on_p_fournisseur_id" end create_table "p_banks", force: :cascade do |t| - t.string "name", limit: 255 - t.string "bic", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "name" + t.string "bic" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_brut_products", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.decimal "price", precision: 14, scale: 2 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_commercial_cats", force: :cascade do |t| - t.string "name", limit: 255 - t.string "description", limit: 255 - t.string "type", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "name" + t.string "description" + t.string "type" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_commercial_object_brands", force: :cascade do |t| t.bigint "p_commercial_id" t.bigint "p_commercial_objective_id" t.bigint "s_brand_id" - t.decimal "objective_percent", precision: 10 - t.decimal "weight_objective", precision: 10 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.decimal "objective_percent" + t.decimal "weight_objective" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false t.boolean "commercial_show", default: true - t.index ["p_commercial_id"], name: "idx_55049_index_p_commercial_object_brands_on_p_commercial_id" - t.index ["p_commercial_objective_id"], name: "idx_55049_index_p_commercial_object_brands_on_p_commercial_obje" - t.index ["s_brand_id"], name: "idx_55049_index_p_commercial_object_brands_on_s_brand_id" + t.index ["p_commercial_id"], name: "index_p_commercial_object_brands_on_p_commercial_id" + t.index ["p_commercial_objective_id"], name: "index_p_commercial_object_brands_on_p_commercial_objective_id" + t.index ["s_brand_id"], name: "index_p_commercial_object_brands_on_s_brand_id" end create_table "p_commercial_object_cats", force: :cascade do |t| t.bigint "p_commercial_id" t.bigint "p_product_cats_id" - t.decimal "objective_percent", precision: 10 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.decimal "objective_percent" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false t.bigint "p_commercial_objective_id" - t.decimal "weight_objective", precision: 10 - t.index ["p_commercial_id"], name: "idx_55058_index_p_commercial_object_cats_on_p_commercial_id" - t.index ["p_commercial_objective_id"], name: "idx_55058_index_p_commercial_object_cats_on_p_commercial_object" - t.index ["p_product_cats_id"], name: "idx_55058_index_p_commercial_object_cats_on_p_product_cats_id" + t.decimal "weight_objective" + t.index ["p_commercial_id"], name: "index_p_commercial_object_cats_on_p_commercial_id" + t.index ["p_commercial_objective_id"], name: "index_p_commercial_object_cats_on_p_commercial_objective_id" + t.index ["p_product_cats_id"], name: "index_p_commercial_object_cats_on_p_product_cats_id" end create_table "p_commercial_object_months", force: :cascade do |t| t.bigint "p_commercial_id" t.date "start_at" t.date "end_at" - t.decimal "objective_percent", precision: 10 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.decimal "objective_percent" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false t.bigint "p_commercial_objective_id" - t.decimal "weight_objective", precision: 10 - t.index ["p_commercial_id"], name: "idx_55066_index_p_commercial_object_months_on_p_commercial_id" - t.index ["p_commercial_objective_id"], name: "idx_55066_index_p_commercial_object_months_on_p_commercial_obje" + t.decimal "weight_objective" + t.index ["p_commercial_id"], name: "index_p_commercial_object_months_on_p_commercial_id" + t.index ["p_commercial_objective_id"], name: "index_p_commercial_object_months_on_p_commercial_objective_id" end create_table "p_commercial_objectives", force: :cascade do |t| t.bigint "p_commercial_id" - t.bigint "total_ca" + t.integer "total_ca" t.date "start_at" t.date "end_at" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.decimal "total_weight", precision: 10 - t.index ["p_commercial_id"], name: "idx_55042_index_p_commercial_objectives_on_p_commercial_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.decimal "total_weight" + t.index ["p_commercial_id"], name: "index_p_commercial_objectives_on_p_commercial_id" end create_table "p_commercials", force: :cascade do |t| t.boolean "enabled", default: true - t.string "code", limit: 255 - t.string "organisation", limit: 255 - t.string "civilite", limit: 255 - t.string "name", limit: 255 - t.string "firstname", limit: 255 - t.string "address_number", limit: 255 - t.string "address_1", limit: 255 - t.string "address_2", limit: 255 - t.string "address_3", limit: 255 - t.string "cp", limit: 255 - t.string "city", limit: 255 - t.string "country", limit: 255 - t.string "phone", limit: 255 - t.string "email", limit: 255 - t.string "token", limit: 255 - t.bigint "p_commercial_cat_id" - t.string "ac_display_name", limit: 255 - t.string "cc_display_name", limit: 255 + t.string "code" + t.string "organisation" + t.string "civilite" + t.string "name" + t.string "firstname" + t.string "address_number" + t.string "address_1" + t.string "address_2" + t.string "address_3" + t.string "cp" + t.string "city" + t.string "country" + t.string "phone" + t.string "email" + t.string "token" + t.integer "p_commercial_cat_id" + t.string "ac_display_name" + t.string "cc_display_name" t.date "start_at" t.date "stop_at" t.text "secteur" t.boolean "avenant" t.date "birth" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false t.decimal "objectif_ht", precision: 14, scale: 2 end create_table "p_compta_elements", force: :cascade do |t| - t.string "element_type", limit: 255 + t.string "element_type" t.bigint "element_id" t.bigint "p_customer_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false t.date "cc_element_date" t.date "ac_element_date" t.boolean "cc_solde" t.boolean "ac_solde" t.decimal "ac_amount", precision: 14, scale: 2 t.decimal "cc_amount", precision: 14, scale: 2 - t.index ["element_id"], name: "idx_55074_index_p_compta_elements_on_element_id" - t.index ["p_customer_id"], name: "idx_55074_index_p_compta_elements_on_p_customer_id" + t.index ["element_id"], name: "index_p_compta_elements_on_element_id" + t.index ["p_customer_id"], name: "index_p_compta_elements_on_p_customer_id" end create_table "p_compta_exports", force: :cascade do |t| @@ -1137,47 +1137,47 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.date "end_at" t.text "comment" t.boolean "validated", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_contact_contact_types", force: :cascade do |t| t.bigint "p_contact_id" t.bigint "p_contact_type_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_contact_id"], name: "idx_55108_index_p_contact_contact_types_on_p_contact_id" - t.index ["p_contact_type_id"], name: "idx_55108_index_p_contact_contact_types_on_p_contact_type_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_contact_id"], name: "index_p_contact_contact_types_on_p_contact_id" + t.index ["p_contact_type_id"], name: "index_p_contact_contact_types_on_p_contact_type_id" end create_table "p_contact_types", force: :cascade do |t| - t.string "name", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "name" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_contacts", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.text "comment" - t.string "tel", limit: 255 - t.string "email", limit: 255 + t.string "tel" + t.string "email" t.boolean "bc", default: false t.boolean "boolean", default: false t.bigint "contactable_id" - t.string "contactable_type", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "contactable_type" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false t.string "skype" - t.index ["contactable_id"], name: "idx_55093_index_p_contacts_on_contactable_id" + t.index ["contactable_id"], name: "index_p_contacts_on_contactable_id" end create_table "p_customer_cats", force: :cascade do |t| - t.string "name", limit: 255 - t.string "code", limit: 255 - t.bigint "payment_days" + t.string "name" + t.string "code" + t.integer "payment_days" t.decimal "encourt_max", precision: 14, scale: 2 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_customer_product_prices", force: :cascade do |t| @@ -1185,215 +1185,215 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.boolean "no_remise" t.bigint "p_customer_id" t.bigint "p_product_ref_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_customer_id"], name: "idx_55183_index_p_customer_product_prices_on_p_customer_id" - t.index ["p_product_ref_id"], name: "idx_55183_index_p_customer_product_prices_on_p_product_ref_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_customer_id"], name: "index_p_customer_product_prices_on_p_customer_id" + t.index ["p_product_ref_id"], name: "index_p_customer_product_prices_on_p_product_ref_id" end create_table "p_customer_ribs", force: :cascade do |t| - t.bigint "nbr_use" - t.string "iban", limit: 255 - t.string "bic", limit: 255 - t.string "bank", limit: 255 - t.string "num_compte", limit: 255 - t.string "intitule", limit: 255 - t.string "address1", limit: 255 - t.string "cp", limit: 255 - t.string "city", limit: 255 - t.string "country", limit: 255 - t.string "rum", limit: 255 + t.integer "nbr_use" + t.string "iban" + t.string "bic" + t.string "bank" + t.string "num_compte" + t.string "intitule" + t.string "address1" + t.string "cp" + t.string "city" + t.string "country" + t.string "rum" t.boolean "import", default: false t.boolean "archived", default: false - t.bigint "price_document_id" - t.bigint "p_mandat_id" + t.integer "price_document_id" + t.integer "p_mandat_id" t.date "sign_date" t.boolean "pres_sepa", default: false t.bigint "p_customer_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_customer_id"], name: "idx_55190_index_p_customer_ribs_on_p_customer_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_customer_id"], name: "index_p_customer_ribs_on_p_customer_id" end create_table "p_customer_sheets", force: :cascade do |t| - t.string "state", limit: 255 - t.string "comments", limit: 255 + t.string "state" + t.string "comments" t.bigint "p_customer_id" - t.bigint "p_commercial_id" - t.bigint "particular_bill_id" - t.bigint "particular_send_id" - t.bigint "ref_particular_bill_id" - t.bigint "ref_particular_send_id" - t.bigint "ac_accounting_zone_id" - t.bigint "cc_accounting_zone_id" - t.string "ac_accounting_zone_name", limit: 255 - t.string "cc_accounting_zone_name", limit: 255 + t.integer "p_commercial_id" + t.integer "particular_bill_id" + t.integer "particular_send_id" + t.integer "ref_particular_bill_id" + t.integer "ref_particular_send_id" + t.integer "ac_accounting_zone_id" + t.integer "cc_accounting_zone_id" + t.string "ac_accounting_zone_name" + t.string "cc_accounting_zone_name" t.decimal "ac_tot_amount_ht", precision: 14, scale: 2 t.decimal "cc_tot_amount_ht", precision: 14, scale: 2 t.decimal "ac_tot_amount_ttc", precision: 14, scale: 2 t.decimal "cc_tot_amount_ttc", precision: 14, scale: 2 t.decimal "ac_tot_amount_tva", precision: 14, scale: 2 t.decimal "cc_tot_amount_tva", precision: 14, scale: 2 - t.string "token", limit: 255 - t.bigint "p_payment_type_id" + t.string "token" + t.integer "p_payment_type_id" t.boolean "ac_payment_comptant" t.boolean "cc_payment_comptant" - t.bigint "ac_payment_delais" - t.bigint "cc_payment_delais" + t.integer "ac_payment_delais" + t.integer "cc_payment_delais" t.boolean "ac_payment_month_end" t.boolean "cc_payment_month_end" t.date "ac_payment_end_at" t.date "cc_payment_end_at" - t.bigint "ac_payment_days" - t.bigint "cc_payment_days" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "ac_payment_days" + t.integer "cc_payment_days" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false t.boolean "archived" - t.string "demande_type", limit: 255 - t.bigint "com_counter_index" - t.string "cc_com_counter", limit: 255 - t.string "ac_com_counter", limit: 255 + t.string "demande_type" + t.integer "com_counter_index" + t.string "cc_com_counter" + t.string "ac_com_counter" t.decimal "ac_weight_tot", precision: 14, scale: 2 t.decimal "cc_weight_tot", precision: 14, scale: 2 - t.bigint "admin_id" + t.integer "admin_id" t.boolean "price_blocked", default: false t.datetime "customer_validation_at" t.boolean "web_order", default: false - t.string "past_id", limit: 255 - t.index ["p_customer_id"], name: "idx_55212_index_p_customer_sheets_on_p_customer_id" + t.string "past_id" + t.index ["p_customer_id"], name: "index_p_customer_sheets_on_p_customer_id" end create_table "p_customer_sites", force: :cascade do |t| t.bigint "p_customer_id" - t.string "name", limit: 255 + t.string "name" t.bigint "particular_id" - t.string "comments", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_customer_id"], name: "idx_55240_index_p_customer_sites_on_p_customer_id" - t.index ["particular_id"], name: "idx_55240_index_p_customer_sites_on_particular_id" + t.string "comments" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_customer_id"], name: "index_p_customer_sites_on_p_customer_id" + t.index ["particular_id"], name: "index_p_customer_sites_on_particular_id" end create_table "p_customers", force: :cascade do |t| t.decimal "encourt_max", precision: 14, scale: 2 t.bigint "p_customer_cat_id" t.bigint "particular_id" - t.string "name", limit: 255 - t.string "code", limit: 255 + t.string "name" + t.string "code" t.boolean "fav", default: false t.boolean "facture_email", default: false t.boolean "risque", default: false - t.bigint "admin_id" + t.integer "admin_id" t.decimal "cache_ca", precision: 14, scale: 2 t.decimal "cache_encours", precision: 14, scale: 2 - t.bigint "cache_moyenne_paiement" - t.bigint "payment_days" - t.bigint "parent_id" - t.string "mlm_token", limit: 255 - t.string "parent_code", limit: 255 + t.integer "cache_moyenne_paiement" + t.integer "payment_days" + t.integer "parent_id" + t.string "mlm_token" + t.string "parent_code" t.boolean "parent_at_create", default: false t.boolean "imported", default: false t.boolean "facture_mail", default: false t.boolean "comptant", default: true t.boolean "acompte", default: false t.decimal "acompte_percent", precision: 14, scale: 2 - t.bigint "payment_delais" + t.integer "payment_delais" t.boolean "payment_fin_de_mois", default: false t.decimal "cache_encours_th", precision: 14, scale: 2 t.decimal "cache_payments_th", precision: 14, scale: 2 t.decimal "cache_payments", precision: 14, scale: 2 t.decimal "cache_payments_tot", precision: 14, scale: 2 - t.bigint "p_payment_type_id" - t.string "i_actif", limit: 255 + t.integer "p_payment_type_id" + t.string "i_actif" t.boolean "i_cat", default: false t.decimal "cache_ca_ttc", precision: 14, scale: 2 - t.bigint "p_commercial_id" - t.bigint "accounting_zone_id" + t.integer "p_commercial_id" + t.integer "accounting_zone_id" t.bigint "market_discount_id" - t.string "siret", limit: 255 - t.string "tva_intra", limit: 255 + t.string "siret" + t.string "tva_intra" t.text "closed_day" t.boolean "discount_enrobage", default: false t.boolean "discount_comptant", default: false t.boolean "discount_ecole", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false t.boolean "enabled", default: true t.text "disabled_raison" - t.string "siren", limit: 255 + t.string "siren" t.datetime "import_created_at" - t.string "website", limit: 255 - t.string "soumis_tva", limit: 255 + t.string "website" + t.string "soumis_tva" t.text "p_customer_sheet_note" - t.string "past_code", limit: 255 - t.bigint "particular_bill_id" - t.bigint "particular_send_id" - t.string "email", limit: 255 - t.string "password_digest", limit: 255 - t.string "reset_password_token", limit: 255 + t.string "past_code" + t.integer "particular_bill_id" + t.integer "particular_send_id" + t.string "email" + t.string "password_digest" + t.string "reset_password_token" t.datetime "reset_password_sent_at" t.datetime "remember_created_at" - t.bigint "sign_in_count" + t.integer "sign_in_count" t.datetime "current_sign_at" t.datetime "last_sign_at" - t.string "current_sign_in_ip", limit: 255 - t.string "last_sign_in_ip", limit: 255 - t.string "auth_token", limit: 255 + t.string "current_sign_in_ip" + t.string "last_sign_in_ip" + t.string "auth_token" t.boolean "online_shop", default: false - t.index ["market_discount_id"], name: "idx_55121_index_p_customers_on_market_discount_id" - t.index ["p_customer_cat_id"], name: "idx_55121_index_p_customers_on_p_customer_cat_id" - t.index ["particular_id"], name: "idx_55121_index_p_customers_on_particular_id" + t.index ["market_discount_id"], name: "index_p_customers_on_market_discount_id" + t.index ["p_customer_cat_id"], name: "index_p_customers_on_p_customer_cat_id" + t.index ["particular_id"], name: "index_p_customers_on_particular_id" end create_table "p_devises", force: :cascade do |t| - t.string "name", limit: 255 - t.string "symbol", limit: 255 + t.string "name" + t.string "symbol" t.decimal "rate", precision: 14, scale: 7 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_document_types", force: :cascade do |t| - t.string "prefix", limit: 255 - t.string "label", limit: 255 - t.string "affix", limit: 255 + t.string "prefix" + t.string "label" + t.string "affix" t.text "header" t.text "footer" - t.bigint "image_file_id" + t.integer "image_file_id" t.bigint "data_file_id" - t.string "class_type", limit: 255 - t.string "sub_type", limit: 255 - t.string "name", limit: 255 + t.string "class_type" + t.string "sub_type" + t.string "name" t.boolean "enabled", default: false - t.bigint "position" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["data_file_id"], name: "idx_55300_index_p_document_types_on_data_file_id" + t.integer "position" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["data_file_id"], name: "index_p_document_types_on_data_file_id" end create_table "p_documents", force: :cascade do |t| - t.string "element_type", limit: 255 + t.string "element_type" t.bigint "element_id" t.bigint "p_document_type_id" t.bigint "particular_bill_id" t.bigint "particular_send_id" - t.string "name", limit: 255 - t.string "d_number", limit: 255 - t.bigint "d_index" - t.bigint "d_year" - t.string "d_prefix", limit: 255 - t.string "label", limit: 255 + t.string "name" + t.string "d_number" + t.integer "d_index" + t.integer "d_year" + t.string "d_prefix" + t.string "label" t.text "header" t.text "footer" - t.bigint "image_file_id" - t.bigint "data_file_id" - t.string "token", limit: 255 + t.integer "image_file_id" + t.integer "data_file_id" + t.string "token" t.bigint "p_sheet_line_id" - t.string "bl_type", limit: 255 + t.string "bl_type" t.decimal "cache_total_ht", precision: 14, scale: 2 t.decimal "cache_total_ttc", precision: 14, scale: 2 t.decimal "cache_tva", precision: 14, scale: 2 - t.bigint "payment_days" + t.integer "payment_days" t.datetime "cache_exp_date" t.bigint "p_customer_id" t.boolean "theo_paid", default: false @@ -1408,36 +1408,36 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.decimal "cache_total_tva", precision: 14, scale: 2 t.boolean "comptant", default: true t.boolean "acompte", default: false - t.bigint "payment_delais" + t.integer "payment_delais" t.boolean "payment_fin_de_mois", default: false t.bigint "p_payment_type_id" t.bigint "p_ship_tour_truck_id" t.boolean "canceled", default: false t.boolean "i_archive", default: false - t.string "cust_ref", limit: 255 - t.bigint "doc_ref_id" + t.string "cust_ref" + t.integer "doc_ref_id" t.date "echeance_date" t.text "avoir_text" - t.string "doc_ref_number", limit: 255 + t.string "doc_ref_number" t.boolean "i_ajust", default: false t.boolean "i_ajust_result", default: false - t.bigint "p_commercial_id" - t.bigint "p_compta_export_id" + t.integer "p_commercial_id" + t.integer "p_compta_export_id" t.boolean "compta_locked", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["element_id"], name: "idx_55263_index_p_documents_on_element_id" - t.index ["p_customer_id"], name: "idx_55263_index_p_documents_on_p_customer_id" - t.index ["p_document_type_id"], name: "idx_55263_index_p_documents_on_p_document_type_id" - t.index ["p_payment_type_id"], name: "idx_55263_index_p_documents_on_p_payment_type_id" - t.index ["p_sheet_line_id"], name: "idx_55263_index_p_documents_on_p_sheet_line_id" - t.index ["p_ship_tour_truck_id"], name: "idx_55263_index_p_documents_on_p_ship_tour_truck_id" - t.index ["particular_bill_id"], name: "idx_55263_index_p_documents_on_particular_bill_id" - t.index ["particular_send_id"], name: "idx_55263_index_p_documents_on_particular_send_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["element_id"], name: "index_p_documents_on_element_id" + t.index ["p_customer_id"], name: "index_p_documents_on_p_customer_id" + t.index ["p_document_type_id"], name: "index_p_documents_on_p_document_type_id" + t.index ["p_payment_type_id"], name: "index_p_documents_on_p_payment_type_id" + t.index ["p_sheet_line_id"], name: "index_p_documents_on_p_sheet_line_id" + t.index ["p_ship_tour_truck_id"], name: "index_p_documents_on_p_ship_tour_truck_id" + t.index ["particular_bill_id"], name: "index_p_documents_on_particular_bill_id" + t.index ["particular_send_id"], name: "index_p_documents_on_particular_send_id" end create_table "p_fournisseur_orders", force: :cascade do |t| - t.string "ref", limit: 255 + t.string "ref" t.decimal "amount", precision: 14, scale: 2 t.datetime "enter_date" t.bigint "p_fournisseur_id" @@ -1447,11 +1447,11 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.decimal "a_total_ttc", precision: 14, scale: 2 t.decimal "a_total_ht", precision: 14, scale: 2 t.decimal "a_tva", precision: 14, scale: 2 - t.bigint "p_compta_export_id" + t.integer "p_compta_export_id" t.boolean "compta_locked", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_fournisseur_id"], name: "idx_55335_index_p_fournisseur_orders_on_p_fournisseur_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_fournisseur_id"], name: "index_p_fournisseur_orders_on_p_fournisseur_id" end create_table "p_fournisseur_refs", force: :cascade do |t| @@ -1466,18 +1466,18 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do end create_table "p_fournisseurs", force: :cascade do |t| - t.string "name", limit: 255 - t.string "code", limit: 255 - t.string "address1", limit: 255 - t.string "address2", limit: 255 - t.string "cp", limit: 255 - t.string "city", limit: 255 - t.string "country", limit: 255 - t.string "email", limit: 255 - t.string "tel", limit: 255 - t.string "compta_account", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "name" + t.string "code" + t.string "address1" + t.string "address2" + t.string "cp" + t.string "city" + t.string "country" + t.string "email" + t.string "tel" + t.string "compta_account" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false t.integer "payment_delais" t.string "tva_num" t.integer "p_payment_type_id" @@ -1486,23 +1486,23 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do end create_table "p_grades", force: :cascade do |t| - t.string "grade", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "grade" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_nutris", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.boolean "public", default: true - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_origines", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.boolean "public", default: true - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_payment_documents", force: :cascade do |t| @@ -1510,24 +1510,24 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.bigint "p_document_id" t.decimal "amount", precision: 14, scale: 2 t.boolean "paid", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.bigint "price_document_id" - t.bigint "avoir_id" - t.index ["p_document_id"], name: "idx_55402_index_p_payment_documents_on_p_document_id" - t.index ["p_payment_id"], name: "idx_55402_index_p_payment_documents_on_p_payment_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.integer "price_document_id" + t.integer "avoir_id" + t.index ["p_document_id"], name: "index_p_payment_documents_on_p_document_id" + t.index ["p_payment_id"], name: "index_p_payment_documents_on_p_payment_id" end create_table "p_payment_types", force: :cascade do |t| - t.string "name", limit: 255 - t.string "code", limit: 255 + t.string "name" + t.string "code" t.boolean "enabled", default: false t.boolean "comptant", default: false - t.bigint "signe" + t.integer "signe" t.bigint "p_bank_account_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_bank_account_id"], name: "idx_55410_index_p_payment_types_on_p_bank_account_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_bank_account_id"], name: "index_p_payment_types_on_p_bank_account_id" end create_table "p_payments", force: :cascade do |t| @@ -1535,7 +1535,7 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.datetime "theo_date" t.bigint "p_payment_type_id" t.decimal "amount", precision: 14, scale: 2 - t.string "number", limit: 255 + t.string "number" t.bigint "p_customer_id" t.boolean "paid", default: false t.boolean "canceled", default: false @@ -1543,8 +1543,8 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.bigint "p_ship_tour_truck_sheet_line_id" t.bigint "p_sheet_line_id" t.boolean "imported", default: false - t.string "label", limit: 255 - t.string "piece", limit: 255 + t.string "label" + t.string "piece" t.boolean "i_archive", default: false t.boolean "remise", default: false t.bigint "p_remise_id" @@ -1555,59 +1555,59 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.date "past_theo_date" t.boolean "past_diff", default: false t.bigint "p_bank_account_id" - t.bigint "p_compta_export_id" + t.integer "p_compta_export_id" t.boolean "compta_locked", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false t.decimal "cc_total_affected", precision: 14, scale: 2 t.decimal "ac_total_affected", precision: 14, scale: 2 t.decimal "cc_reste_to_affect", precision: 14, scale: 2 t.decimal "ac_reste_to_affect", precision: 14, scale: 2 t.boolean "cc_affected", default: false t.boolean "ac_affected", default: false - t.bigint "price_document_id" - t.index ["p_bank_account_id"], name: "idx_55373_index_p_payments_on_p_bank_account_id" - t.index ["p_customer_id"], name: "idx_55373_index_p_payments_on_p_customer_id" - t.index ["p_payment_type_id"], name: "idx_55373_index_p_payments_on_p_payment_type_id" - t.index ["p_remise_id"], name: "idx_55373_index_p_payments_on_p_remise_id" - t.index ["p_sheet_line_id"], name: "idx_55373_index_p_payments_on_p_sheet_line_id" - t.index ["p_ship_tour_truck_sheet_line_id"], name: "idx_55373_index_p_payments_on_p_ship_tour_truck_sheet_line_id" + t.integer "price_document_id" + t.index ["p_bank_account_id"], name: "index_p_payments_on_p_bank_account_id" + t.index ["p_customer_id"], name: "index_p_payments_on_p_customer_id" + t.index ["p_payment_type_id"], name: "index_p_payments_on_p_payment_type_id" + t.index ["p_remise_id"], name: "index_p_payments_on_p_remise_id" + t.index ["p_sheet_line_id"], name: "index_p_payments_on_p_sheet_line_id" + t.index ["p_ship_tour_truck_sheet_line_id"], name: "index_p_payments_on_p_ship_tour_truck_sheet_line_id" end create_table "p_price_cats", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.boolean "enabled", default: true - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_product_aromes", force: :cascade do |t| t.bigint "p_product_id" t.bigint "p_arome_id" t.decimal "qte", precision: 6, scale: 2 - t.bigint "position" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_arome_id"], name: "idx_55478_index_p_product_aromes_on_p_arome_id" - t.index ["p_product_id"], name: "idx_55478_index_p_product_aromes_on_p_product_id" + t.integer "position" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_arome_id"], name: "index_p_product_aromes_on_p_arome_id" + t.index ["p_product_id"], name: "index_p_product_aromes_on_p_product_id" end create_table "p_product_assembleds", force: :cascade do |t| - t.bigint "parent_product_ref_id" - t.bigint "p_product_ref_id" - t.decimal "qte", precision: 10 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "parent_product_ref_id" + t.integer "p_product_ref_id" + t.decimal "qte" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_product_brut_products", force: :cascade do |t| t.bigint "p_brut_product_id" t.bigint "p_product_id" t.decimal "qte", precision: 14, scale: 2 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_brut_product_id"], name: "idx_55492_index_p_product_brut_products_on_p_brut_product_id" - t.index ["p_product_id"], name: "idx_55492_index_p_product_brut_products_on_p_product_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_brut_product_id"], name: "index_p_product_brut_products_on_p_brut_product_id" + t.index ["p_product_id"], name: "index_p_product_brut_products_on_p_product_id" end create_table "p_product_brut_stocks", force: :cascade do |t| @@ -1624,75 +1624,75 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.boolean "ok", default: false t.decimal "qte_restant", precision: 14, scale: 2, default: "0.0" t.boolean "lock", default: false - t.string "stock_type", limit: 255 + t.string "stock_type" t.boolean "externe", default: false t.boolean "comptabilised", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_brut_product_id"], name: "idx_55499_index_p_product_brut_stocks_on_p_brut_product_id" - t.index ["p_fournisseur_order_id"], name: "idx_55499_index_p_product_brut_stocks_on_p_fournisseur_order_id" - t.index ["p_tank_id"], name: "idx_55499_index_p_product_brut_stocks_on_p_tank_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_brut_product_id"], name: "index_p_product_brut_stocks_on_p_brut_product_id" + t.index ["p_fournisseur_order_id"], name: "index_p_product_brut_stocks_on_p_fournisseur_order_id" + t.index ["p_tank_id"], name: "index_p_product_brut_stocks_on_p_tank_id" end create_table "p_product_cats", force: :cascade do |t| - t.string "name", limit: 255 - t.string "code", limit: 255 - t.string "purchase_account", limit: 255 - t.string "sale_account", limit: 255 - t.bigint "parent_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "name" + t.string "code" + t.string "purchase_account" + t.string "sale_account" + t.integer "parent_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false t.boolean "stocked", default: true t.boolean "commercial_show", default: true end create_table "p_product_colors", force: :cascade do |t| - t.string "name", limit: 255 - t.string "color", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "name" + t.string "color" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_product_feature_cats", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.text "description" t.boolean "enabled" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_product_features", force: :cascade do |t| - t.bigint "p_product_feature_cat_id" - t.string "ac_name", limit: 255 - t.string "cc_name", limit: 255 - t.string "value", limit: 255 - t.bigint "p_product_ref_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "p_product_feature_cat_id" + t.string "ac_name" + t.string "cc_name" + t.string "value" + t.integer "p_product_ref_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_product_images", force: :cascade do |t| - t.string "name", limit: 255 - t.string "description", limit: 255 + t.string "name" + t.string "description" t.bigint "p_product_id" t.bigint "p_product_ref_id" t.boolean "enabled", default: true - t.bigint "position" + t.integer "position" t.bigint "image_file_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["image_file_id"], name: "idx_55565_index_p_product_images_on_image_file_id" - t.index ["p_product_id"], name: "idx_55565_index_p_product_images_on_p_product_id" - t.index ["p_product_ref_id"], name: "idx_55565_index_p_product_images_on_p_product_ref_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["image_file_id"], name: "index_p_product_images_on_image_file_id" + t.index ["p_product_id"], name: "index_p_product_images_on_p_product_id" + t.index ["p_product_ref_id"], name: "index_p_product_images_on_p_product_ref_id" end create_table "p_product_ingredients", force: :cascade do |t| - t.bigint "p_product_id" - t.bigint "ingredient_id" + t.integer "p_product_id" + t.integer "ingredient_id" t.decimal "qte", precision: 6, scale: 2 - t.bigint "position" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "position" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_product_nutris", force: :cascade do |t| @@ -1700,119 +1700,119 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.bigint "p_nutri_id" t.decimal "qte", precision: 6, scale: 2 t.decimal "ar", precision: 6, scale: 2 - t.bigint "position" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_nutri_id"], name: "idx_55584_index_p_product_nutris_on_p_nutri_id" - t.index ["p_product_id"], name: "idx_55584_index_p_product_nutris_on_p_product_id" + t.integer "position" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_nutri_id"], name: "index_p_product_nutris_on_p_nutri_id" + t.index ["p_product_id"], name: "index_p_product_nutris_on_p_product_id" end create_table "p_product_origines", force: :cascade do |t| t.bigint "p_product_id" t.bigint "p_origine_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_origine_id"], name: "idx_55592_index_p_product_origines_on_p_origine_id" - t.index ["p_product_id"], name: "idx_55592_index_p_product_origines_on_p_product_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_origine_id"], name: "index_p_product_origines_on_p_origine_id" + t.index ["p_product_id"], name: "index_p_product_origines_on_p_product_id" end create_table "p_product_p_customer_cats", force: :cascade do |t| t.bigint "p_product_id" t.bigint "p_customer_cat_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_customer_cat_id"], name: "idx_55613_index_p_product_p_customer_cats_on_p_customer_cat_id" - t.index ["p_product_id"], name: "idx_55613_index_p_product_p_customer_cats_on_p_product_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_customer_cat_id"], name: "index_p_product_p_customer_cats_on_p_customer_cat_id" + t.index ["p_product_id"], name: "index_p_product_p_customer_cats_on_p_product_id" end create_table "p_product_p_normes", force: :cascade do |t| t.bigint "p_product_id" t.bigint "p_product_spec_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_product_id"], name: "idx_55619_index_p_product_p_normes_on_p_product_id" - t.index ["p_product_spec_id"], name: "idx_55619_index_p_product_p_normes_on_p_product_spec_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_product_id"], name: "index_p_product_p_normes_on_p_product_id" + t.index ["p_product_spec_id"], name: "index_p_product_p_normes_on_p_product_spec_id" end create_table "p_product_p_product_sub_cats", force: :cascade do |t| t.bigint "p_product_id" t.bigint "p_product_sub_cat_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_product_id"], name: "idx_55625_index_p_product_p_product_sub_cats_on_p_product_id" - t.index ["p_product_sub_cat_id"], name: "idx_55625_index_p_product_p_product_sub_cats_on_p_product_sub_c" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_product_id"], name: "index_p_product_p_product_sub_cats_on_p_product_id" + t.index ["p_product_sub_cat_id"], name: "index_p_product_p_product_sub_cats_on_p_product_sub_cat_id" end create_table "p_product_powers", force: :cascade do |t| - t.string "name", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "name" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_product_prices", force: :cascade do |t| t.boolean "enabled", default: true t.bigint "p_product_ref_id" t.bigint "p_price_cat_id" - t.bigint "min" - t.bigint "max" + t.integer "min" + t.integer "max" t.decimal "ct_price_ht", precision: 14, scale: 2 - t.bigint "past_p_product_price" + t.integer "past_p_product_price" t.datetime "remove_at" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_price_cat_id"], name: "idx_55605_index_p_product_prices_on_p_price_cat_id" - t.index ["p_product_ref_id"], name: "idx_55605_index_p_product_prices_on_p_product_ref_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_price_cat_id"], name: "index_p_product_prices_on_p_price_cat_id" + t.index ["p_product_ref_id"], name: "index_p_product_prices_on_p_product_ref_id" end create_table "p_product_ref_price_histories", force: :cascade do |t| t.bigint "p_product_ref_id" t.decimal "price", precision: 14, scale: 2 t.bigint "admin_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["admin_id"], name: "idx_55658_index_p_product_ref_price_histories_on_admin_id" - t.index ["p_product_ref_id"], name: "idx_55658_index_p_product_ref_price_histories_on_p_product_ref_" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["admin_id"], name: "index_p_product_ref_price_histories_on_admin_id" + t.index ["p_product_ref_id"], name: "index_p_product_ref_price_histories_on_p_product_ref_id" end create_table "p_product_ref_specs", force: :cascade do |t| t.bigint "p_product_ref_id" t.bigint "p_spec_type_id" t.bigint "p_spec_value_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_product_ref_id"], name: "idx_55665_index_p_product_ref_specs_on_p_product_ref_id" - t.index ["p_spec_type_id"], name: "idx_55665_index_p_product_ref_specs_on_p_spec_type_id" - t.index ["p_spec_value_id"], name: "idx_55665_index_p_product_ref_specs_on_p_spec_value_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_product_ref_id"], name: "index_p_product_ref_specs_on_p_product_ref_id" + t.index ["p_spec_type_id"], name: "index_p_product_ref_specs_on_p_spec_type_id" + t.index ["p_spec_value_id"], name: "index_p_product_ref_specs_on_p_spec_value_id" end create_table "p_product_refs", force: :cascade do |t| - t.string "ref", limit: 255 - t.bigint "p_product_id" + t.string "ref" + t.integer "p_product_id" t.decimal "ct_price_ht", precision: 14, scale: 2 - t.string "cc_name", limit: 255 - t.string "ac_name", limit: 255 + t.string "cc_name" + t.string "ac_name" t.decimal "weight", precision: 14, scale: 2 - t.string "ct_sub_name", limit: 255 - t.bigint "cc_p_product_cat_id" - t.bigint "ac_p_product_cat_id" - t.string "uv", limit: 255 - t.string "capacite", limit: 255 - t.string "cc_sub_cat_names", limit: 255 - t.string "ac_sub_cat_names", limit: 255 - t.string "cc_cat_name", limit: 255 - t.string "ac_cat_name", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "ct_sub_name" + t.integer "cc_p_product_cat_id" + t.integer "ac_p_product_cat_id" + t.string "uv" + t.string "capacite" + t.string "cc_sub_cat_names" + t.string "ac_sub_cat_names" + t.string "cc_cat_name" + t.string "ac_cat_name" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false t.boolean "no_remise", default: false t.boolean "assembled", default: false t.boolean "promo", default: false t.date "start_at" t.date "end_at" - t.string "cc_code", limit: 255 - t.string "ac_code", limit: 255 + t.string "cc_code" + t.string "ac_code" t.boolean "stocked", default: true t.text "description" - t.bigint "p_product_color_id" + t.integer "p_product_color_id" t.decimal "ac_sorecop", precision: 10, scale: 2 t.decimal "cc_sorecop", precision: 10, scale: 2 t.decimal "ct_sorecop", precision: 10, scale: 2 @@ -1844,85 +1844,85 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do create_table "p_product_specs", force: :cascade do |t| t.bigint "p_product_id" - t.string "code", limit: 255 + t.string "code" t.text "description" t.boolean "un", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_product_id"], name: "idx_55671_index_p_product_specs_on_p_product_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_product_id"], name: "index_p_product_specs_on_p_product_id" end create_table "p_product_sub_cats", force: :cascade do |t| - t.bigint "parent_id" - t.string "code", limit: 255 - t.string "name", limit: 255 - t.bigint "position" + t.integer "parent_id" + t.string "code" + t.string "name" + t.integer "position" t.boolean "enabled" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false t.boolean "menu", default: false end create_table "p_product_utilisations", force: :cascade do |t| t.bigint "p_product_id" t.bigint "p_utilisation_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_product_id"], name: "idx_55694_index_p_product_utilisations_on_p_product_id" - t.index ["p_utilisation_id"], name: "idx_55694_index_p_product_utilisations_on_p_utilisation_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_product_id"], name: "index_p_product_utilisations_on_p_product_id" + t.index ["p_utilisation_id"], name: "index_p_product_utilisations_on_p_utilisation_id" end create_table "p_product_zones", force: :cascade do |t| - t.string "name", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "name" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_products", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.decimal "ct_price_ht", precision: 14, scale: 2 t.decimal "ct_purchase_price_ht", precision: 14, scale: 2 t.bigint "p_product_cat_id" - t.string "code", limit: 255 - t.string "sub_code", limit: 255 - t.string "conditionnement", limit: 255 - t.string "uv", limit: 255 + t.string "code" + t.string "sub_code" + t.string "conditionnement" + t.string "uv" t.boolean "tgap", default: false t.boolean "fisc", default: false - t.string "un", limit: 255 + t.string "un" t.decimal "capacite", precision: 14, scale: 2 t.boolean "enabled", default: true t.bigint "s_brand_id" t.boolean "discount_enrobage", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.bigint "p_customer_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.integer "p_customer_id" t.boolean "imported", default: false t.text "note" - t.bigint "a_code_tva" - t.string "price_calc", limit: 255, default: "Kg" - t.string "country", limit: 255 - t.string "sub_country", limit: 255 - t.string "domaine", limit: 255 - t.string "imp_sale_account", limit: 255 + t.integer "a_code_tva" + t.string "price_calc", default: "Kg" + t.string "country" + t.string "sub_country" + t.string "domaine" + t.string "imp_sale_account" t.text "description" - t.bigint "image_file_id" + t.integer "image_file_id" t.decimal "fonte_min", precision: 6, scale: 2 t.decimal "fonte_max", precision: 6, scale: 2 t.decimal "cristal_min", precision: 6, scale: 2 t.decimal "cristal_max", precision: 6, scale: 2 t.decimal "travail_min", precision: 6, scale: 2 t.decimal "travail_max", precision: 6, scale: 2 - t.bigint "intensite_cacao" - t.string "country_fabrication", limit: 255 + t.integer "intensite_cacao" + t.string "country_fabrication" t.decimal "viscosite", precision: 6, scale: 2 t.text "utilisation_text" t.text "chapeau" t.boolean "grand_cru", default: false t.boolean "vegan", default: false t.boolean "public", default: false - t.string "visco_text", limit: 255 - t.string "finesse_text", limit: 255 + t.string "visco_text" + t.string "finesse_text" t.decimal "viscosite_min", precision: 6, scale: 2 t.decimal "viscosite_max", precision: 6, scale: 2 t.decimal "finesse_min", precision: 6, scale: 2 @@ -1930,8 +1930,8 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.boolean "conserve_proportion", default: false t.boolean "frontpage", default: true t.integer "sorecop_cat_id" - t.index ["p_product_cat_id"], name: "idx_55431_index_p_products_on_p_product_cat_id" - t.index ["s_brand_id"], name: "idx_55431_index_p_products_on_s_brand_id" + t.index ["p_product_cat_id"], name: "index_p_products_on_p_product_cat_id" + t.index ["s_brand_id"], name: "index_p_products_on_s_brand_id" end create_table "p_remises", force: :cascade do |t| @@ -1939,22 +1939,22 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.boolean "validated", default: false t.bigint "p_payment_type_id" t.bigint "p_bank_account_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_bank_account_id"], name: "idx_55707_index_p_remises_on_p_bank_account_id" - t.index ["p_payment_type_id"], name: "idx_55707_index_p_remises_on_p_payment_type_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_bank_account_id"], name: "index_p_remises_on_p_bank_account_id" + t.index ["p_payment_type_id"], name: "index_p_remises_on_p_payment_type_id" end create_table "p_serial_num_types", force: :cascade do |t| - t.string "name", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "name" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_serial_num_values", force: :cascade do |t| - t.string "value", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "value" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_sheet_line_stocks", force: :cascade do |t| @@ -1969,11 +1969,11 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.decimal "price_ok", precision: 14, scale: 2 t.boolean "lock", default: false t.boolean "decr", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_brut_product_id"], name: "idx_55764_index_p_sheet_line_stocks_on_p_brut_product_id" - t.index ["p_product_brut_stock_id"], name: "idx_55764_index_p_sheet_line_stocks_on_p_product_brut_stock_id" - t.index ["p_sheet_line_id"], name: "idx_55764_index_p_sheet_line_stocks_on_p_sheet_line_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_brut_product_id"], name: "index_p_sheet_line_stocks_on_p_brut_product_id" + t.index ["p_product_brut_stock_id"], name: "index_p_sheet_line_stocks_on_p_product_brut_stock_id" + t.index ["p_sheet_line_id"], name: "index_p_sheet_line_stocks_on_p_sheet_line_id" end create_table "p_sheet_lines", force: :cascade do |t| @@ -1989,74 +1989,74 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.boolean "ok", default: false t.boolean "lock", default: false t.boolean "externe", default: false - t.bigint "externe_stock_id" + t.integer "externe_stock_id" t.bigint "p_document_id" t.boolean "shiped", default: false t.boolean "bl", default: false t.boolean "ship", default: false - t.bigint "p_ship_tour_truck_sheet_line_id" + t.integer "p_ship_tour_truck_sheet_line_id" t.boolean "stock_done", default: false t.decimal "a_total_cost_ok", precision: 14, scale: 2 - t.string "ref", limit: 255 + t.string "ref" t.decimal "price_tot", precision: 14, scale: 2 t.decimal "price_tot_ttc", precision: 14, scale: 2 t.decimal "ok_price_tot", precision: 14, scale: 2 t.decimal "ok_price_tot_ttc", precision: 14, scale: 2 t.boolean "imported", default: false - t.string "piece", limit: 255 + t.string "piece" t.boolean "arrondi", default: false t.boolean "decr", default: false - t.string "custom_title", limit: 255 + t.string "custom_title" t.text "custom_desc" t.boolean "no_stock", default: false t.boolean "custom", default: false - t.string "element_label", limit: 255 + t.string "element_label" t.boolean "cancel", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_customer_sheet_id"], name: "idx_55728_index_p_sheet_lines_on_p_customer_sheet_id" - t.index ["p_document_id"], name: "idx_55728_index_p_sheet_lines_on_p_document_id" - t.index ["p_product_id"], name: "idx_55728_index_p_sheet_lines_on_p_product_id" - t.index ["p_tank_id"], name: "idx_55728_index_p_sheet_lines_on_p_tank_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_customer_sheet_id"], name: "index_p_sheet_lines_on_p_customer_sheet_id" + t.index ["p_document_id"], name: "index_p_sheet_lines_on_p_document_id" + t.index ["p_product_id"], name: "index_p_sheet_lines_on_p_product_id" + t.index ["p_tank_id"], name: "index_p_sheet_lines_on_p_tank_id" end create_table "p_ship_bill_lines", force: :cascade do |t| t.bigint "p_ship_bill_id" - t.string "name", limit: 255 + t.string "name" t.text "description" t.decimal "qte", precision: 14, scale: 2 t.decimal "price", precision: 14, scale: 2 t.decimal "a_ok_total", precision: 14, scale: 2 t.boolean "paid", default: false t.date "paid_at" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_ship_bill_id"], name: "idx_55788_index_p_ship_bill_lines_on_p_ship_bill_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_ship_bill_id"], name: "index_p_ship_bill_lines_on_p_ship_bill_id" end create_table "p_ship_bills", force: :cascade do |t| t.date "count_date" t.date "bill_at" - t.string "ref", limit: 255 + t.string "ref" t.bigint "p_fournisseur_id" t.text "comment" t.decimal "a_ok_total", precision: 14, scale: 2 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_fournisseur_id"], name: "idx_55777_index_p_ship_bills_on_p_fournisseur_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_fournisseur_id"], name: "index_p_ship_bills_on_p_fournisseur_id" end create_table "p_spec_types", force: :cascade do |t| - t.string "name", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "name" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_spec_values", force: :cascade do |t| - t.string "value", limit: 255 - t.string "unit", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "value" + t.string "unit" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "p_tank_stocks", force: :cascade do |t| @@ -2066,97 +2066,97 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.decimal "volume", precision: 14, scale: 2 t.decimal "price", precision: 14, scale: 2 t.bigint "p_tank_id" - t.string "stock_type", limit: 255 + t.string "stock_type" t.decimal "volume_abs", precision: 14, scale: 2 t.decimal "volume_restant", precision: 14, scale: 2 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_brut_product_id"], name: "idx_55828_index_p_tank_stocks_on_p_brut_product_id" - t.index ["p_tank_id"], name: "idx_55828_index_p_tank_stocks_on_p_tank_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_brut_product_id"], name: "index_p_tank_stocks_on_p_brut_product_id" + t.index ["p_tank_id"], name: "index_p_tank_stocks_on_p_tank_id" end create_table "p_tanks", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.decimal "volume", precision: 14, scale: 2 t.bigint "p_brut_product_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_brut_product_id"], name: "idx_55820_index_p_tanks_on_p_brut_product_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_brut_product_id"], name: "index_p_tanks_on_p_brut_product_id" end create_table "p_truck_spaces", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.decimal "volume", precision: 14, scale: 2 t.bigint "p_truck_id" - t.bigint "default_p_tank_id" - t.string "code", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["p_truck_id"], name: "idx_55840_index_p_truck_spaces_on_p_truck_id" + t.integer "default_p_tank_id" + t.string "code" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["p_truck_id"], name: "index_p_truck_spaces_on_p_truck_id" end create_table "p_utilisations", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.boolean "public", default: true - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "pages", force: :cascade do |t| t.text "title" t.text "description" t.text "keywords" - t.bigint "lang_site_id" - t.bigint "page_type_id", default: 1 + t.integer "lang_site_id" + t.integer "page_type_id", default: 1 t.boolean "clikable", default: true - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "particulars", force: :cascade do |t| t.boolean "pro", default: false - t.string "organisation", limit: 255 - t.string "name", limit: 255 - t.string "firstname", limit: 255 - t.string "address_1", limit: 255 - t.string "address_2", limit: 255 - t.string "address_3", limit: 255 - t.string "address_4", limit: 255 - t.string "address_5", limit: 255 - t.string "cp", limit: 255 - t.string "city", limit: 255 - t.string "country", limit: 255 - t.string "tel", limit: 255 - t.string "email", limit: 255 - t.string "tel2", limit: 255 - t.string "tel3", limit: 255 - t.string "fax", limit: 255 - t.string "owner_type", limit: 255 + t.string "organisation" + t.string "name" + t.string "firstname" + t.string "address_1" + t.string "address_2" + t.string "address_3" + t.string "address_4" + t.string "address_5" + t.string "cp" + t.string "city" + t.string "country" + t.string "tel" + t.string "email" + t.string "tel2" + t.string "tel3" + t.string "fax" + t.string "owner_type" t.bigint "owner_id" - t.string "particular_type", limit: 255 + t.string "particular_type" t.boolean "skip_validation", default: false - t.string "civilite", limit: 255 + t.string "civilite" t.boolean "archived", default: false - t.bigint "particular_ref_id" + t.integer "particular_ref_id" t.boolean "price_in_bl", default: true - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "com_name", limit: 255 - t.index ["owner_id"], name: "idx_54626_index_particulars_on_owner_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.string "com_name" + t.index ["owner_id"], name: "index_particulars_on_owner_id" end create_table "partition_lines", force: :cascade do |t| - t.bigint "p_product_ref_from_id" - t.bigint "p_product_ref_to_id" + t.integer "p_product_ref_from_id" + t.integer "p_product_ref_to_id" t.bigint "partition_id" - t.bigint "qte_from" - t.bigint "qte_to" + t.integer "qte_from" + t.integer "qte_to" t.text "description" t.boolean "stock_ok", default: false t.decimal "amount", precision: 15, scale: 2 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["partition_id"], name: "idx_54670_index_partition_lines_on_partition_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["partition_id"], name: "index_partition_lines_on_partition_id" end create_table "partitions", force: :cascade do |t| @@ -2165,162 +2165,162 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.text "description" t.boolean "stock_ok", default: false t.decimal "amount", precision: 15, scale: 2 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["admin_id"], name: "idx_54659_index_partitions_on_admin_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["admin_id"], name: "index_partitions_on_admin_id" end create_table "portlets", force: :cascade do |t| t.bigint "block_id" t.bigint "content_id" - t.string "content_type", limit: 255 - t.bigint "position" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["block_id"], name: "idx_54681_index_portlets_on_block_id" - t.index ["content_id"], name: "idx_54681_index_portlets_on_content_id" + t.string "content_type" + t.integer "position" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["block_id"], name: "index_portlets_on_block_id" + t.index ["content_id"], name: "index_portlets_on_content_id" end create_table "price_document_types", force: :cascade do |t| - t.string "prefix", limit: 255 - t.string "label", limit: 255 - t.string "affix", limit: 255 + t.string "prefix" + t.string "label" + t.string "affix" t.text "header" t.text "footer" - t.bigint "image_file_id" - t.bigint "data_file_id" - t.string "class_type", limit: 255 - t.string "sub_type", limit: 255 + t.integer "image_file_id" + t.integer "data_file_id" + t.string "class_type" + t.string "sub_type" t.boolean "enabled", default: true - t.string "movement_type", limit: 255, default: "cred" + t.string "movement_type", default: "cred" t.boolean "accounting", default: false - t.bigint "poisition" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "poisition" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "price_documents", force: :cascade do |t| t.boolean "archived" t.bigint "p_customer_id" - t.bigint "p_commercial_id" - t.string "movement_type", limit: 255 + t.integer "p_commercial_id" + t.string "movement_type" t.boolean "accounting", default: false t.boolean "soldable", default: false t.datetime "date" - t.bigint "ac_accounting_zone_id" - t.bigint "cc_accounting_zone_id" - t.string "ac_accounting_zone_name", limit: 255 - t.string "cc_accounting_zone_name", limit: 255 + t.integer "ac_accounting_zone_id" + t.integer "cc_accounting_zone_id" + t.string "ac_accounting_zone_name" + t.string "cc_accounting_zone_name" t.decimal "ac_tot_amount_ht", precision: 14, scale: 2 t.decimal "cc_tot_amount_ht", precision: 14, scale: 2 t.decimal "ac_tot_amount_ttc", precision: 14, scale: 2 t.decimal "cc_tot_amount_ttc", precision: 14, scale: 2 t.decimal "ac_tot_amount_tva", precision: 14, scale: 2 t.decimal "cc_tot_amount_tva", precision: 14, scale: 2 - t.string "d_number", limit: 255 - t.bigint "d_index" - t.bigint "d_year" - t.bigint "d_month" - t.bigint "d_day" - t.string "d_prefix", limit: 255 + t.string "d_number" + t.integer "d_index" + t.integer "d_year" + t.integer "d_month" + t.integer "d_day" + t.string "d_prefix" t.boolean "solded", default: false t.boolean "imported", default: false - t.string "ref_element_type", limit: 255 - t.bigint "ref_element_id" - t.bigint "price_document_type_id" - t.string "ac_label", limit: 255 - t.string "cc_label", limit: 255 - t.string "token", limit: 255 + t.string "ref_element_type" + t.integer "ref_element_id" + t.integer "price_document_type_id" + t.string "ac_label" + t.string "cc_label" + t.string "token" t.text "ct_header" t.text "ac_header" t.text "cc_header" t.text "ct_footer" t.text "ac_footer" t.text "cc_footer" - t.bigint "ac_payment_days" - t.bigint "cc_payment_days" + t.integer "ac_payment_days" + t.integer "cc_payment_days" t.datetime "paid_at" - t.bigint "ct_payment_delais" - t.bigint "ac_payment_delais" - t.bigint "cc_payment_delais" + t.integer "ct_payment_delais" + t.integer "ac_payment_delais" + t.integer "cc_payment_delais" t.boolean "ct_payment_month_end" t.boolean "ac_payment_month_end" t.boolean "cc_payment_month_end" t.date "ac_payment_end_at" t.date "cc_payment_end_at" - t.bigint "doc_ref_id" + t.integer "doc_ref_id" t.boolean "accounting_locked", default: false - t.bigint "particular_bill_id" - t.bigint "particular_send_id" - t.bigint "ac_particular_bill_id" - t.bigint "ac_particular_send_id" + t.integer "particular_bill_id" + t.integer "particular_send_id" + t.integer "ac_particular_bill_id" + t.integer "ac_particular_send_id" t.decimal "ac_to_paid_ht", precision: 14, scale: 2 t.decimal "cc_to_paid_ht", precision: 14, scale: 2 t.decimal "ac_to_paid_ttc", precision: 14, scale: 2 t.decimal "cc_to_paid_ttc", precision: 14, scale: 2 t.decimal "ac_to_paid_tva", precision: 14, scale: 2 t.decimal "cc_to_paid_tva", precision: 14, scale: 2 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false t.boolean "cc_solded" t.boolean "ac_solded" - t.bigint "p_payment_type_id" + t.integer "p_payment_type_id" t.boolean "compta_export", default: false t.boolean "compta_locked", default: false - t.bigint "p_compta_export_id" + t.integer "p_compta_export_id" t.decimal "ac_weight_tot", precision: 14, scale: 2 t.decimal "cc_weight_tot", precision: 14, scale: 2 t.boolean "price_blocked", default: false - t.bigint "bon_de_commande_id" - t.bigint "bon_de_livraison_id" - t.bigint "facture_id" + t.integer "bon_de_commande_id" + t.integer "bon_de_livraison_id" + t.integer "facture_id" t.boolean "reliquat" - t.bigint "p_fournisseur_id" + t.integer "p_fournisseur_id" t.boolean "cost_ok", default: false t.boolean "stock_ok", default: false - t.bigint "p_devise_id", default: 1 + t.integer "p_devise_id", default: 1 t.decimal "cc_cost_ht", precision: 14, scale: 2 t.decimal "cc_marge_ht", precision: 14, scale: 2 t.decimal "ac_cost_ht", precision: 14, scale: 2 t.decimal "ac_marge_ht", precision: 14, scale: 2 t.boolean "cancelled", default: false t.datetime "cc_solded_at" - t.bigint "cc_solded_nbr_days" + t.integer "cc_solded_nbr_days" t.datetime "ac_solded_at" - t.bigint "ac_solded_nbr_days" - t.bigint "order_hist_id" - t.string "statut", limit: 255 + t.integer "ac_solded_nbr_days" + t.integer "order_hist_id" + t.string "statut" t.decimal "avancement", precision: 10, scale: 2 t.boolean "ended", default: false t.text "list_designaton" t.date "end_date" t.text "dp_comment" t.date "eta_min" - t.string "f_token", limit: 255 + t.string "f_token" t.text "acheteur_text" - t.string "public_fournisseur_name", limit: 255 + t.string "public_fournisseur_name" t.integer "bon_de_commande_achat_id" t.integer "bon_de_reception_achat_id" t.integer "demande_de_prix_id" t.integer "avoir_achat_id" t.integer "facture_achat_id" - t.index ["p_customer_id"], name: "idx_54688_index_price_documents_on_p_customer_id" + t.index ["p_customer_id"], name: "index_price_documents_on_p_customer_id" end create_table "price_line_blocks", force: :cascade do |t| t.bigint "p_customer_id" - t.bigint "p_commercial_id" - t.bigint "ac_p_customer_cat_id" - t.bigint "cc_p_customer_cat_id" - t.bigint "particular_bill_id" - t.bigint "particular_send_id" - t.bigint "ref_particular_bill_id" - t.bigint "ref_particular_send_id" + t.integer "p_commercial_id" + t.integer "ac_p_customer_cat_id" + t.integer "cc_p_customer_cat_id" + t.integer "particular_bill_id" + t.integer "particular_send_id" + t.integer "ref_particular_bill_id" + t.integer "ref_particular_send_id" t.boolean "archived" - t.string "movement_type", limit: 255, default: "cred" + t.string "movement_type", default: "cred" t.boolean "accounting", default: false - t.bigint "price_lineable_id" - t.string "price_lineable_type", limit: 255 + t.integer "price_lineable_id" + t.string "price_lineable_type" t.date "ct_creation_date" t.date "cc_creation_date" t.date "ac_creation_date" @@ -2330,14 +2330,14 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.boolean "cc_remise_ecole_ok" t.boolean "ac_remise_enrobage_ok" t.boolean "ac_remise_ecole_ok" - t.string "customer_ref", limit: 255 - t.bigint "ct_nbr_ship" - t.bigint "ac_nbr_ship" - t.bigint "cc_nbr_ship" - t.bigint "ac_accounting_zone_id" - t.bigint "cc_accounting_zone_id" - t.string "ac_accounting_zone_name", limit: 255 - t.string "cc_accounting_zone_name", limit: 255 + t.string "customer_ref" + t.integer "ct_nbr_ship" + t.integer "ac_nbr_ship" + t.integer "cc_nbr_ship" + t.integer "ac_accounting_zone_id" + t.integer "cc_accounting_zone_id" + t.string "ac_accounting_zone_name" + t.string "cc_accounting_zone_name" t.decimal "ac_tot_lines_ht", precision: 14, scale: 2 t.decimal "cc_tot_lines_ht", precision: 14, scale: 2 t.decimal "ac_tot_lines_tva", precision: 14, scale: 2 @@ -2385,13 +2385,13 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.decimal "cc_tot_amount_ttc", precision: 14, scale: 2 t.decimal "ac_weight_tot", precision: 14, scale: 2 t.decimal "cc_weight_tot", precision: 14, scale: 2 - t.bigint "p_payment_type_id" + t.integer "p_payment_type_id" t.boolean "ct_payment_comptant" t.boolean "ac_payment_comptant" t.boolean "cc_payment_comptant" - t.bigint "ct_payment_delais" - t.bigint "ac_payment_delais" - t.bigint "cc_payment_delais" + t.integer "ct_payment_delais" + t.integer "ac_payment_delais" + t.integer "cc_payment_delais" t.boolean "ct_payment_month_end" t.boolean "ac_payment_month_end" t.boolean "cc_payment_month_end" @@ -2403,10 +2403,10 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.decimal "ct_acompte_percent", precision: 14, scale: 2 t.decimal "ac_acompte_percent", precision: 14, scale: 2 t.decimal "cc_acompte_percent", precision: 14, scale: 2 - t.bigint "ac_payment_days" - t.bigint "cc_payment_days" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "ac_payment_days" + t.integer "cc_payment_days" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false t.text "bl_comment" t.text "f_comment" t.text "bc_comment" @@ -2419,25 +2419,25 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.boolean "cc_discount_comptant" t.boolean "ac_discount_comptant" t.boolean "price_blocked", default: false - t.string "ac_block_type", limit: 255 - t.string "cc_block_type", limit: 255 + t.string "ac_block_type" + t.string "cc_block_type" t.decimal "cc_customer_market_discount_percent", precision: 14, scale: 2 t.decimal "ac_customer_market_discount_percent", precision: 14, scale: 2 - t.bigint "ac_bon_de_commande_id" - t.bigint "cc_bon_de_commande_id" - t.bigint "ac_bon_de_livraison_id" - t.bigint "cc_bon_de_livraison_id" - t.bigint "ac_facture_id" - t.bigint "cc_facture_id" + t.integer "ac_bon_de_commande_id" + t.integer "cc_bon_de_commande_id" + t.integer "ac_bon_de_livraison_id" + t.integer "cc_bon_de_livraison_id" + t.integer "ac_facture_id" + t.integer "cc_facture_id" t.boolean "ac_reliquat" t.boolean "cc_reliquat" t.decimal "bk_tot_fdp_ht", precision: 14, scale: 2 t.decimal "reliquat_fdp_ht", precision: 14, scale: 2 - t.bigint "p_devise_id", default: 1 + t.integer "p_devise_id", default: 1 t.decimal "cc_devise_rate", precision: 14, scale: 7, default: "1.0" t.decimal "ac_devise_rate", precision: 14, scale: 7 - t.bigint "local_amount_ttc" - t.bigint "p_fournisseur_id" + t.integer "local_amount_ttc" + t.integer "p_fournisseur_id" t.boolean "cost_ok", default: false t.boolean "stock_ok", default: false t.decimal "cc_cost_ht", precision: 14, scale: 2 @@ -2446,14 +2446,14 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.decimal "ac_marge_ht", precision: 14, scale: 2 t.boolean "cancelled", default: false t.datetime "cc_solded_at" - t.bigint "cc_solded_nbr_days" + t.integer "cc_solded_nbr_days" t.datetime "ac_solded_at" - t.bigint "ac_solded_nbr_days" - t.bigint "order_hist_id" + t.integer "ac_solded_nbr_days" + t.integer "order_hist_id" t.boolean "imported", default: false t.date "validation_date" - t.string "cc_state", limit: 255 - t.index ["p_customer_id"], name: "idx_54863_index_price_line_blocks_on_p_customer_id" + t.string "cc_state" + t.index ["p_customer_id"], name: "index_price_line_blocks_on_p_customer_id" end create_table "price_line_resp_selects", force: :cascade do |t| @@ -2465,33 +2465,33 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do create_table "price_lines", force: :cascade do |t| t.boolean "archived" - t.bigint "price_line_block_id" - t.bigint "position" - t.string "line_type", limit: 255 - t.bigint "ac_accounting_zone_id" - t.bigint "cc_accounting_zone_id" - t.string "ac_accounting_zone_name", limit: 255 - t.string "cc_accounting_zone_name", limit: 255 - t.bigint "ac_tva_account_id" - t.bigint "cc_tva_account_id" + t.integer "price_line_block_id" + t.integer "position" + t.string "line_type" + t.integer "ac_accounting_zone_id" + t.integer "cc_accounting_zone_id" + t.string "ac_accounting_zone_name" + t.string "cc_accounting_zone_name" + t.integer "ac_tva_account_id" + t.integer "cc_tva_account_id" t.decimal "ac_tva_account_value", precision: 5, scale: 2 t.decimal "cc_tva_account_value", precision: 5, scale: 2 - t.bigint "p_product_id" - t.bigint "p_product_variante_id" - t.bigint "p_product_alt_id" - t.bigint "p_product_alt_variante_id" - t.bigint "p_product_ref_id" - t.bigint "p_product_ref_variante_id" - t.string "ct_ref", limit: 255 - t.string "ac_ref", limit: 255 - t.string "cc_ref", limit: 255 - t.string "ct_title", limit: 255 - t.string "ac_title", limit: 255 - t.string "cc_title", limit: 255 + t.integer "p_product_id" + t.integer "p_product_variante_id" + t.integer "p_product_alt_id" + t.integer "p_product_alt_variante_id" + t.integer "p_product_ref_id" + t.integer "p_product_ref_variante_id" + t.string "ct_ref" + t.string "ac_ref" + t.string "cc_ref" + t.string "ct_title" + t.string "ac_title" + t.string "cc_title" t.boolean "ac_product_remise_enrobage_ok" t.boolean "cc_product_remise_enrobage_ok" - t.string "ac_uv", limit: 255 - t.string "cc_uv", limit: 255 + t.string "ac_uv" + t.string "cc_uv" t.text "ct_description" t.text "ac_description" t.text "cc_description" @@ -2545,27 +2545,27 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.decimal "cc_tot_amount_tva", precision: 15, scale: 3 t.decimal "ac_tot_amount_ttc", precision: 15, scale: 3 t.decimal "cc_tot_amount_ttc", precision: 15, scale: 3 - t.bigint "p_cter_id" + t.integer "p_cter_id" t.decimal "ct_weight_u", precision: 15, scale: 3 t.decimal "ac_weight_u", precision: 15, scale: 3 t.decimal "cc_weight_u", precision: 15, scale: 3 t.decimal "ac_weight_tot", precision: 15, scale: 3 t.decimal "cc_weight_tot", precision: 15, scale: 3 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.bigint "cc_p_product_specific_customer_id" - t.bigint "ac_p_product_specific_customer_id" - t.string "ac_price_calc", limit: 255 - t.string "cc_price_calc", limit: 255 + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.integer "cc_p_product_specific_customer_id" + t.integer "ac_p_product_specific_customer_id" + t.string "ac_price_calc" + t.string "cc_price_calc" t.boolean "cc_product_no_remise", default: false t.boolean "ac_product_no_remise" - t.bigint "ct_tva_account_id" + t.integer "ct_tva_account_id" t.decimal "bk_price_ht", precision: 14, scale: 4 - t.string "ac_block_type", limit: 255 - t.string "cc_block_type", limit: 255 - t.bigint "price_line_ref_id" - t.bigint "cc_p_devise_id" - t.bigint "ac_p_devise_id" + t.string "ac_block_type" + t.string "cc_block_type" + t.integer "price_line_ref_id" + t.integer "cc_p_devise_id" + t.integer "ac_p_devise_id" t.decimal "cc_devise_rate", precision: 14, scale: 7, default: "1.0" t.decimal "ac_devise_rate", precision: 14, scale: 7 t.decimal "cc_local_tot_amount_ht", precision: 15, scale: 3 @@ -2581,198 +2581,198 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.decimal "ct_tot_amount_ht", precision: 16, scale: 4 t.boolean "cancelled", default: false t.date "dluo" - t.string "lot", limit: 255 - t.bigint "ac_p_product_cat_id" - t.bigint "ac_p_customer_id" - t.bigint "cc_p_product_cat_id" - t.bigint "cc_p_customer_id" - t.bigint "order_hist_id" + t.string "lot" + t.integer "ac_p_product_cat_id" + t.integer "ac_p_customer_id" + t.integer "cc_p_product_cat_id" + t.integer "cc_p_customer_id" + t.integer "order_hist_id" t.boolean "imported", default: false t.decimal "ct_cost_ht", precision: 15, scale: 3 t.text "comment" t.date "cc_validation_date" t.date "cc_creation_date" t.date "cc_wish_date" - t.string "cc_state", limit: 255 - t.decimal "qte_available", precision: 10 - t.string "ref_fournisseur", limit: 255 - t.bigint "p_product_power_id" - t.bigint "p_product_zone_id" + t.string "cc_state" + t.decimal "qte_available" + t.string "ref_fournisseur" + t.integer "p_product_power_id" + t.integer "p_product_zone_id" t.boolean "ready_stock" - t.string "ram", limit: 255 - t.string "ram_unit", limit: 255 + t.string "ram" + t.string "ram_unit" t.boolean "eu" t.boolean "fullkit" t.boolean "lang_start" - t.bigint "selected_price_line_id" + t.integer "selected_price_line_id" end create_table "quote_contents", force: :cascade do |t| t.text "quote" - t.string "author", limit: 255 - t.string "color", limit: 255 - t.string "background", limit: 255 - t.string "style", limit: 255 + t.string "author" + t.string "color" + t.string "background" + t.string "style" t.bigint "image_file_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["image_file_id"], name: "idx_55860_index_quote_contents_on_image_file_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["image_file_id"], name: "index_quote_contents_on_image_file_id" end create_table "s_brands", force: :cascade do |t| t.boolean "enabled", default: true - t.string "code", limit: 255 - t.string "name", limit: 255 + t.string "code" + t.string "name" t.text "description" - t.string "url", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "url" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "s_compta_accounts", force: :cascade do |t| - t.string "code", limit: 255 - t.string "name", limit: 255 - t.string "i_account", limit: 255 - t.string "i_sale_account", limit: 255 - t.string "i_account_ps", limit: 255 - t.string "zone", limit: 255 - t.string "purchase_account", limit: 255 - t.string "sale_account", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "code" + t.string "name" + t.string "i_account" + t.string "i_sale_account" + t.string "i_account_ps" + t.string "zone" + t.string "purchase_account" + t.string "sale_account" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "s_module_configurations", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.text "description" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "s_modules", force: :cascade do |t| - t.bigint "serial_nbr" - t.string "cache_long_serial_number", limit: 255 + t.integer "serial_nbr" + t.string "cache_long_serial_number" t.bigint "s_modules_state_id" t.date "order_date" t.date "production_start_date" t.date "production_end_date" t.bigint "s_module_configuration_id" t.bigint "s_site_id" - t.string "name", limit: 255 + t.string "name" t.text "description" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["s_module_configuration_id"], name: "idx_56073_index_s_modules_on_s_module_configuration_id" - t.index ["s_modules_state_id"], name: "idx_56073_index_s_modules_on_s_modules_state_id" - t.index ["s_site_id"], name: "idx_56073_index_s_modules_on_s_site_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["s_module_configuration_id"], name: "index_s_modules_on_s_module_configuration_id" + t.index ["s_modules_state_id"], name: "index_s_modules_on_s_modules_state_id" + t.index ["s_site_id"], name: "index_s_modules_on_s_site_id" end create_table "s_modules_states", force: :cascade do |t| - t.string "name", limit: 255 - t.string "slug", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "name" + t.string "slug" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "s_organisations", force: :cascade do |t| - t.string "name", limit: 255 - t.string "address1", limit: 255 - t.string "address2", limit: 255 - t.string "address3", limit: 255 - t.string "tel", limit: 255 - t.string "fax", limit: 255 - t.string "email", limit: 255 - t.string "website", limit: 255 - t.string "siret", limit: 255 - t.string "siren", limit: 255 - t.string "rcs", limit: 255 - t.string "ape", limit: 255 - t.string "capital", limit: 255 - t.string "forme", limit: 255 + t.string "name" + t.string "address1" + t.string "address2" + t.string "address3" + t.string "tel" + t.string "fax" + t.string "email" + t.string "website" + t.string "siret" + t.string "siren" + t.string "rcs" + t.string "ape" + t.string "capital" + t.string "forme" t.text "description" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "s_site_types", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.text "description" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "s_sites", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.text "description" t.boolean "externe" t.bigint "s_site_type_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["s_site_type_id"], name: "idx_56128_index_s_sites_on_s_site_type_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["s_site_type_id"], name: "index_s_sites_on_s_site_type_id" end create_table "share_contents", force: :cascade do |t| - t.string "url", limit: 255 - t.string "facebook_url", limit: 255 + t.string "url" + t.string "facebook_url" t.boolean "facebook", default: false - t.string "twitter_url", limit: 255 - t.string "twitter_title", limit: 255 + t.string "twitter_url" + t.string "twitter_title" t.boolean "twitter", default: false - t.string "mail_subject", limit: 255 - t.string "mail_url", limit: 255 + t.string "mail_subject" + t.string "mail_url" t.text "mail_content" t.boolean "mail", default: false - t.string "print_url", limit: 255 + t.string "print_url" t.boolean "print", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "societes", force: :cascade do |t| - t.string "socmanaginn", limit: 255 - t.string "nom", limit: 255 - t.string "adresse1", limit: 255 - t.string "adresse2", limit: 255 - t.string "codepostal", limit: 255 - t.string "ville", limit: 255 - t.string "pays", limit: 255 - t.string "numtel", limit: 255 - t.string "numfax", limit: 255 - t.string "mobile", limit: 255 - t.string "mail", limit: 255 - t.string "mailcc", limit: 255 - t.string "mailbcc", limit: 255 - t.string "siteweb", limit: 255 - t.string "statut", limit: 255 - t.string "rc", limit: 255 - t.string "naf", limit: 255 - t.string "soc_type", limit: 255 - t.string "enseigne", limit: 255 + t.string "socmanaginn" + t.string "nom" + t.string "adresse1" + t.string "adresse2" + t.string "codepostal" + t.string "ville" + t.string "pays" + t.string "numtel" + t.string "numfax" + t.string "mobile" + t.string "mail" + t.string "mailcc" + t.string "mailbcc" + t.string "siteweb" + t.string "statut" + t.string "rc" + t.string "naf" + t.string "soc_type" + t.string "enseigne" t.datetime "datecreation" - t.string "activite1", limit: 255 - t.string "activite2", limit: 255 - t.string "activite3", limit: 255 - t.string "activite4", limit: 255 - t.string "activite5", limit: 255 - t.string "login", limit: 255 - t.string "password", limit: 255 - t.string "photo", limit: 255 - t.string "typeuser", limit: 255 - t.string "codeproprietaire", limit: 255 - t.string "typepartage", limit: 255 - t.string "libre1", limit: 255 - t.string "libre2", limit: 255 - t.string "libre3", limit: 255 - t.string "libre4", limit: 255 - t.string "libre5", limit: 255 - t.string "accesbloque", limit: 255 - t.string "corbeille", limit: 255 - t.string "codetpe", limit: 255 - t.string "codecreateur", limit: 255 - t.string "partagedefaut", limit: 255 - t.string "npai", limit: 255 - t.string "npaimail", limit: 255 - t.string "npaisms", limit: 255 + t.string "activite1" + t.string "activite2" + t.string "activite3" + t.string "activite4" + t.string "activite5" + t.string "login" + t.string "password" + t.string "photo" + t.string "typeuser" + t.string "codeproprietaire" + t.string "typepartage" + t.string "libre1" + t.string "libre2" + t.string "libre3" + t.string "libre4" + t.string "libre5" + t.string "accesbloque" + t.string "corbeille" + t.string "codetpe" + t.string "codecreateur" + t.string "partagedefaut" + t.string "npai" + t.string "npaimail" + t.string "npaisms" t.decimal "ac_rate", precision: 14, scale: 2 t.decimal "cc_rate", precision: 14, scale: 2 t.decimal "ac_cagnotte", precision: 14, scale: 2 @@ -2781,13 +2781,13 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.decimal "cc_cumul", precision: 14, scale: 2 t.boolean "enabled", default: false t.date "last_volume_at" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "bon_type", limit: 255 + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.string "bon_type" t.decimal "seuil", precision: 14, scale: 2 t.decimal "remise_percent", precision: 14, scale: 2 t.decimal "bon_amount", precision: 14, scale: 2 - t.string "send_via", limit: 255 + t.string "send_via" t.decimal "cc_total", precision: 14, scale: 2 t.decimal "ac_total", precision: 14, scale: 2 t.decimal "cc_remise", precision: 14, scale: 2 @@ -2813,21 +2813,21 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do end create_table "specific_preferences", force: :cascade do |t| - t.string "key", limit: 255 - t.string "value", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "key" + t.string "value" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "stat_lines", force: :cascade do |t| t.bigint "p_product_id" - t.string "product_name", limit: 255 - t.string "product_code", limit: 255 + t.string "product_name" + t.string "product_code" t.bigint "p_product_ref_id" - t.string "p_product_ref_name", limit: 255 + t.string "p_product_ref_name" t.decimal "tva_rate", precision: 10, scale: 2 - t.bigint "tva_account_id" - t.string "title", limit: 255 + t.integer "tva_account_id" + t.string "title" t.decimal "price_u_ht", precision: 15, scale: 3 t.decimal "price_u_tva", precision: 15, scale: 3 t.decimal "price_u_ttc", precision: 15, scale: 3 @@ -2850,27 +2850,27 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.decimal "cost_u_w_ht", precision: 15, scale: 3 t.decimal "marge_u_w_ht", precision: 15, scale: 3 t.bigint "p_commercial_id" - t.string "p_commercial_name", limit: 255 - t.string "p_commercial_code", limit: 255 + t.string "p_commercial_name" + t.string "p_commercial_code" t.bigint "p_product_cat_id" - t.string "p_product_cat_name", limit: 255 + t.string "p_product_cat_name" t.bigint "p_customer_id" - t.string "p_customer_name", limit: 255 - t.string "p_customer_code", limit: 255 + t.string "p_customer_name" + t.string "p_customer_code" t.date "date" - t.bigint "price_document_id" - t.string "price_document_number", limit: 255 - t.bigint "price_line_block_id" - t.bigint "price_line_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.bigint "s_brand_id" - t.string "s_brand_name", limit: 255 - t.index ["p_commercial_id"], name: "idx_55975_index_stat_lines_on_p_commercial_id" - t.index ["p_customer_id"], name: "idx_55975_index_stat_lines_on_p_customer_id" - t.index ["p_product_cat_id"], name: "idx_55975_index_stat_lines_on_p_product_cat_id" - t.index ["p_product_id"], name: "idx_55975_index_stat_lines_on_p_product_id" - t.index ["p_product_ref_id"], name: "idx_55975_index_stat_lines_on_p_product_ref_id" + t.integer "price_document_id" + t.string "price_document_number" + t.integer "price_line_block_id" + t.integer "price_line_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.integer "s_brand_id" + t.string "s_brand_name" + t.index ["p_commercial_id"], name: "index_stat_lines_on_p_commercial_id" + t.index ["p_customer_id"], name: "index_stat_lines_on_p_customer_id" + t.index ["p_product_cat_id"], name: "index_stat_lines_on_p_product_cat_id" + t.index ["p_product_id"], name: "index_stat_lines_on_p_product_id" + t.index ["p_product_ref_id"], name: "index_stat_lines_on_p_product_ref_id" end create_table "stock_movement_lines", force: :cascade do |t| @@ -2882,367 +2882,367 @@ ActiveRecord::Schema.define(version: 2021_10_18_142636) do t.decimal "cc_tot_amount_ht", precision: 14, scale: 2 t.decimal "ac_tot_amount_ht", precision: 14, scale: 2 t.decimal "qte", precision: 14, scale: 2 - t.bigint "p_product_ref_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "p_product_ref_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false t.date "dluo" - t.index ["stock_movement_id"], name: "idx_56030_index_stock_movement_lines_on_stock_movement_id" + t.index ["stock_movement_id"], name: "index_stock_movement_lines_on_stock_movement_id" end create_table "stock_movements", force: :cascade do |t| - t.string "movement_type", limit: 255, default: "deb" + t.string "movement_type", default: "deb" t.text "description" - t.bigint "admin_id" + t.integer "admin_id" t.date "date" t.decimal "cc_tot_amount_ht", precision: 14, scale: 2 t.decimal "ac_tot_amount_ht", precision: 14, scale: 2 t.boolean "stock_done", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "table_contents", force: :cascade do |t| - t.bigint "style" - t.bigint "nbr_rows" - t.bigint "nbr_cols" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "style" + t.integer "nbr_rows" + t.integer "nbr_cols" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "table_rows", force: :cascade do |t| - t.bigint "position" - t.bigint "style" + t.integer "position" + t.integer "style" t.bigint "table_content_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["table_content_id"], name: "idx_56154_index_table_rows_on_table_content_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["table_content_id"], name: "index_table_rows_on_table_content_id" end create_table "tag_taggables", force: :cascade do |t| - t.string "taggable_type", limit: 255 + t.string "taggable_type" t.bigint "taggable_id" t.bigint "tag_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["tag_id"], name: "idx_56173_index_tag_taggables_on_tag_id" - t.index ["taggable_id"], name: "idx_56173_index_tag_taggables_on_taggable_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["tag_id"], name: "index_tag_taggables_on_tag_id" + t.index ["taggable_id"], name: "index_tag_taggables_on_taggable_id" end create_table "tags", force: :cascade do |t| - t.string "name", limit: 255 - t.string "slug", limit: 255 - t.bigint "parent_id" + t.string "name" + t.string "slug" + t.integer "parent_id" t.boolean "public", default: false - t.string "taggable_type", limit: 255 + t.string "taggable_type" t.bigint "taggable_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["taggable_id"], name: "idx_56160_index_tags_on_taggable_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["taggable_id"], name: "index_tags_on_taggable_id" end create_table "text_contents", force: :cascade do |t| - t.string "style", limit: 255 + t.string "style" t.text "content" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "timer_watchers", force: :cascade do |t| - t.string "element_type", limit: 255 - t.bigint "element_id" - t.string "key", limit: 255 + t.string "element_type" + t.integer "element_id" + t.string "key" t.bigint "admin_id" t.bigint "p_customer_id" - t.string "admin_space", limit: 255 + t.string "admin_space" t.datetime "end_at" - t.bigint "time_ok" + t.integer "time_ok" t.boolean "write_action" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["admin_id"], name: "idx_56190_index_timer_watchers_on_admin_id" - t.index ["p_customer_id"], name: "idx_56190_index_timer_watchers_on_p_customer_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["admin_id"], name: "index_timer_watchers_on_admin_id" + t.index ["p_customer_id"], name: "index_timer_watchers_on_p_customer_id" end create_table "tiny_urls", force: :cascade do |t| - t.string "url", limit: 255 - t.string "slug", limit: 255 + t.string "url" + t.string "slug" t.text "description" t.datetime "start_at" t.datetime "stop_at" - t.bigint "nbr_views" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "nbr_views" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "title_contents", force: :cascade do |t| t.text "content" - t.bigint "level" - t.string "style", limit: 255 - t.string "alignement", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "level" + t.string "style" + t.string "alignement" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "translations", force: :cascade do |t| - t.string "locale", limit: 255 - t.string "key", limit: 255 + t.string "locale" + t.string "key" t.text "value" t.text "interpolations" t.boolean "is_proc", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "tva_rates", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.text "description" t.bigint "accounting_zone_id" t.boolean "enabled", default: true t.decimal "rate", precision: 5, scale: 2 - t.string "purchase_account", limit: 255 - t.string "sale_account", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "sale_product_account", limit: 255 - t.index ["accounting_zone_id"], name: "idx_56243_index_tva_rates_on_accounting_zone_id" + t.string "purchase_account" + t.string "sale_account" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.string "sale_product_account" + t.index ["accounting_zone_id"], name: "index_tva_rates_on_accounting_zone_id" end create_table "tvable_tva_rates", force: :cascade do |t| - t.bigint "tvable_id" - t.string "tvable_type", limit: 255 - t.bigint "tva_rate_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "tvable_id" + t.string "tvable_type" + t.integer "tva_rate_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "v_bdas", force: :cascade do |t| - t.string "token", limit: 255 + t.string "token" t.date "date" t.decimal "amount", precision: 14, scale: 2 t.decimal "seuil", precision: 14, scale: 2 t.boolean "used", default: false t.date "end_at" t.bigint "volume_periodique_id" - t.bigint "v_contact_id" - t.bigint "societe_id" - t.bigint "societe_use_id" + t.integer "v_contact_id" + t.integer "societe_id" + t.integer "societe_use_id" t.text "comment" - t.string "bda_type", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "send_via", limit: 255 + t.string "bda_type" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.string "send_via" t.boolean "sended" - t.string "email", limit: 255 - t.index ["volume_periodique_id"], name: "idx_56332_index_v_bdas_on_volume_periodique_id" + t.string "email" + t.index ["volume_periodique_id"], name: "index_v_bdas_on_volume_periodique_id" end create_table "v_contacts", force: :cascade do |t| - t.string "codemanaginn", limit: 255 - t.string "nomgroupe", limit: 255 - t.string "societe", limit: 255 - t.string "civilite", limit: 255 - t.string "nom", limit: 255 - t.string "prenom", limit: 255 - t.string "titre", limit: 255 - t.string "mailto", limit: 255 - t.string "mailcc", limit: 255 - t.string "mailbcc", limit: 255 - t.string "numportable", limit: 255 - t.string "numtel", limit: 255 - t.string "numfax", limit: 255 - t.string "adresse1", limit: 255 - t.string "adresse2", limit: 255 - t.string "codepostal", limit: 255 - t.string "ville", limit: 255 - t.string "anniversaire", limit: 255 - t.string "pays", limit: 255 - t.string "photo", limit: 255 - t.string "login", limit: 255 - t.string "password", limit: 255 - t.string "typeuser", limit: 255 - t.string "commentaire", limit: 255 - t.string "codeproprietaire", limit: 255 - t.string "typepartage", limit: 255 - t.string "libre1", limit: 255 - t.string "libre2", limit: 255 - t.string "libre3", limit: 255 - t.string "libre4", limit: 255 - t.string "libre5", limit: 255 - t.string "accesbloque", limit: 255 - t.string "corbeille", limit: 255 - t.string "codecreateur", limit: 255 - t.string "partagedefaut", limit: 255 - t.string "npai", limit: 255 - t.string "npaimail", limit: 255 - t.string "npaisms", limit: 255 - t.string "rate", limit: 255 + t.string "codemanaginn" + t.string "nomgroupe" + t.string "societe" + t.string "civilite" + t.string "nom" + t.string "prenom" + t.string "titre" + t.string "mailto" + t.string "mailcc" + t.string "mailbcc" + t.string "numportable" + t.string "numtel" + t.string "numfax" + t.string "adresse1" + t.string "adresse2" + t.string "codepostal" + t.string "ville" + t.string "anniversaire" + t.string "pays" + t.string "photo" + t.string "login" + t.string "password" + t.string "typeuser" + t.string "commentaire" + t.string "codeproprietaire" + t.string "typepartage" + t.string "libre1" + t.string "libre2" + t.string "libre3" + t.string "libre4" + t.string "libre5" + t.string "accesbloque" + t.string "corbeille" + t.string "codecreateur" + t.string "partagedefaut" + t.string "npai" + t.string "npaimail" + t.string "npaisms" + t.string "rate" t.decimal "cumul", precision: 14, scale: 2 t.decimal "cagnotte", precision: 14, scale: 2 t.decimal "prime", precision: 14, scale: 2 - t.bigint "nbr_vidanges" - t.bigint "vidanges_seuil" - t.bigint "vidanges_offerte" + t.integer "nbr_vidanges" + t.integer "vidanges_seuil" + t.integer "vidanges_offerte" t.date "datecreation" t.date "last_volume_at" t.decimal "ac_rate", precision: 14, scale: 2 t.boolean "enabled", default: false - t.bigint "nbr_mvt" - t.string "cc_centre", limit: 255 - t.string "ac_centre", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "nbr_mvt" + t.string "cc_centre" + t.string "ac_centre" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false t.decimal "cc_cagnotte", precision: 14, scale: 2 t.decimal "cc_total", precision: 14, scale: 2 t.decimal "cc_remise", precision: 14, scale: 2 t.decimal "ac_cagnotte", precision: 14, scale: 2 t.decimal "ac_total", precision: 14, scale: 2 t.decimal "ac_remise", precision: 14, scale: 2 - t.bigint "societe_id" - t.string "a_codeproprietaire", limit: 255 + t.integer "societe_id" + t.string "a_codeproprietaire" end create_table "video_contents", force: :cascade do |t| t.bigint "video_file_id" - t.string "title", limit: 255 + t.string "title" t.boolean "download", default: false t.boolean "autoplay", default: false t.boolean "fullscreen", default: false t.boolean "controls", default: false - t.string "legend", limit: 255 - t.string "style", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["video_file_id"], name: "idx_56258_index_video_contents_on_video_file_id" + t.string "legend" + t.string "style" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["video_file_id"], name: "index_video_contents_on_video_file_id" end create_table "video_file_langs", force: :cascade do |t| - t.string "title", limit: 255 + t.string "title" t.text "description" - t.string "slug", limit: 255 + t.string "slug" t.bigint "video_file_id" t.bigint "lang_site_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["lang_site_id"], name: "idx_56296_index_video_file_langs_on_lang_site_id" - t.index ["video_file_id"], name: "idx_56296_index_video_file_langs_on_video_file_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["lang_site_id"], name: "index_video_file_langs_on_lang_site_id" + t.index ["video_file_id"], name: "index_video_file_langs_on_video_file_id" end create_table "video_files", force: :cascade do |t| - t.string "title", limit: 255 + t.string "title" t.text "description" - t.string "token", limit: 255 - t.string "poster", limit: 255 - t.string "mpg", limit: 255 - t.string "ogg", limit: 255 - t.string "webm", limit: 255 - t.string "youtube_link", limit: 255 - t.string "youtube_code", limit: 255 + t.string "token" + t.string "poster" + t.string "mpg" + t.string "ogg" + t.string "webm" + t.string "youtube_link" + t.string "youtube_code" t.bigint "video_folder_id" - t.string "slug", limit: 255 + t.string "slug" t.bigint "image_file_id" - t.string "vimeo_code", limit: 255 + t.string "vimeo_code" t.boolean "public", default: false t.datetime "published_at" - t.bigint "position" + t.integer "position" t.boolean "fr", default: true t.boolean "en", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["image_file_id"], name: "idx_56274_index_video_files_on_image_file_id" - t.index ["video_folder_id"], name: "idx_56274_index_video_files_on_video_folder_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["image_file_id"], name: "index_video_files_on_image_file_id" + t.index ["video_folder_id"], name: "index_video_files_on_video_folder_id" end create_table "video_folders", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.boolean "super_admin", default: false t.text "description" t.boolean "public", default: false - t.bigint "position" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "position" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end create_table "volume_periodiques", force: :cascade do |t| - t.string "codemanaginn", limit: 255 - t.string "codeindicateur", limit: 255 + t.string "codemanaginn" + t.string "codeindicateur" t.datetime "datedebut" t.datetime "datefin" t.decimal "valeur", precision: 12, scale: 2 t.datetime "datereception" t.text "commentaire" - t.string "codesociete", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "codesociete" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false end - add_foreign_key "admin_preferences", "admins", on_update: :restrict, on_delete: :restrict - add_foreign_key "i_task_projects", "admins", on_update: :restrict, on_delete: :restrict - add_foreign_key "i_tasks", "admins", on_update: :restrict, on_delete: :restrict - add_foreign_key "i_tasks", "i_task_projects", on_update: :restrict, on_delete: :restrict - add_foreign_key "import_csv_champs", "import_csvs", on_update: :restrict, on_delete: :restrict - add_foreign_key "import_csv_elements", "import_csvs", on_update: :restrict, on_delete: :restrict - add_foreign_key "import_csv_headers", "import_csvs", on_update: :restrict, on_delete: :restrict - add_foreign_key "line_stock_usages", "line_stocks", on_update: :restrict, on_delete: :restrict - add_foreign_key "line_stocks", "p_product_refs", on_update: :restrict, on_delete: :restrict - add_foreign_key "mail_hists", "mail_contents", on_update: :restrict, on_delete: :restrict - add_foreign_key "mail_hists", "mail_types", on_update: :restrict, on_delete: :restrict - add_foreign_key "order_hist_lines", "order_hists", on_update: :restrict, on_delete: :restrict - add_foreign_key "order_hist_lines", "p_commercials", on_update: :restrict, on_delete: :restrict - add_foreign_key "order_hist_lines", "p_customers", on_update: :restrict, on_delete: :restrict - add_foreign_key "order_hist_lines", "p_payment_types", on_update: :restrict, on_delete: :restrict - add_foreign_key "order_hist_lines", "p_product_refs", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_article_serial_nums", "p_articles", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_article_serial_nums", "p_serial_num_types", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_article_serial_nums", "p_serial_num_values", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_articles", "p_grades", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_articles", "p_product_refs", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_commercial_object_brands", "p_commercial_objectives", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_commercial_object_brands", "p_commercials", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_commercial_object_brands", "s_brands", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_commercial_object_cats", "p_commercial_objectives", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_commercial_object_cats", "p_commercials", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_commercial_object_cats", "p_product_cats", column: "p_product_cats_id", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_commercial_object_months", "p_commercial_objectives", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_commercial_object_months", "p_commercials", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_commercial_objectives", "p_commercials", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_contact_contact_types", "p_contact_types", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_contact_contact_types", "p_contacts", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_customer_product_prices", "p_customers", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_customer_product_prices", "p_product_refs", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_customer_ribs", "p_customers", on_update: :restrict, on_delete: :restrict + add_foreign_key "admin_preferences", "admins" + add_foreign_key "i_task_projects", "admins" + add_foreign_key "i_tasks", "admins" + add_foreign_key "i_tasks", "i_task_projects" + add_foreign_key "import_csv_champs", "import_csvs" + add_foreign_key "import_csv_elements", "import_csvs" + add_foreign_key "import_csv_headers", "import_csvs" + add_foreign_key "line_stock_usages", "line_stocks" + add_foreign_key "line_stocks", "p_product_refs" + add_foreign_key "mail_hists", "mail_contents" + add_foreign_key "mail_hists", "mail_types" + add_foreign_key "order_hist_lines", "order_hists" + add_foreign_key "order_hist_lines", "p_commercials" + add_foreign_key "order_hist_lines", "p_customers" + add_foreign_key "order_hist_lines", "p_payment_types" + add_foreign_key "order_hist_lines", "p_product_refs" + add_foreign_key "p_article_serial_nums", "p_articles" + add_foreign_key "p_article_serial_nums", "p_serial_num_types" + add_foreign_key "p_article_serial_nums", "p_serial_num_values" + add_foreign_key "p_articles", "p_grades" + add_foreign_key "p_articles", "p_product_refs" + add_foreign_key "p_commercial_object_brands", "p_commercial_objectives" + add_foreign_key "p_commercial_object_brands", "p_commercials" + add_foreign_key "p_commercial_object_brands", "s_brands" + add_foreign_key "p_commercial_object_cats", "p_commercial_objectives" + add_foreign_key "p_commercial_object_cats", "p_commercials" + add_foreign_key "p_commercial_object_cats", "p_product_cats", column: "p_product_cats_id" + add_foreign_key "p_commercial_object_months", "p_commercial_objectives" + add_foreign_key "p_commercial_object_months", "p_commercials" + add_foreign_key "p_commercial_objectives", "p_commercials" + add_foreign_key "p_contact_contact_types", "p_contact_types" + add_foreign_key "p_contact_contact_types", "p_contacts" + add_foreign_key "p_customer_product_prices", "p_customers" + add_foreign_key "p_customer_product_prices", "p_product_refs" + add_foreign_key "p_customer_ribs", "p_customers" add_foreign_key "p_fournisseur_refs", "p_fournisseurs" add_foreign_key "p_fournisseur_refs", "p_product_refs" - add_foreign_key "p_product_aromes", "p_aromes", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_product_aromes", "p_products", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_product_images", "image_files", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_product_images", "p_product_refs", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_product_images", "p_products", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_product_nutris", "p_nutris", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_product_nutris", "p_products", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_product_origines", "p_origines", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_product_origines", "p_products", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_product_p_customer_cats", "p_customer_cats", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_product_p_customer_cats", "p_products", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_product_p_product_sub_cats", "p_product_sub_cats", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_product_p_product_sub_cats", "p_products", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_product_prices", "p_price_cats", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_product_prices", "p_product_refs", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_product_ref_price_histories", "p_product_refs", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_product_ref_specs", "p_product_refs", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_product_ref_specs", "p_spec_types", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_product_ref_specs", "p_spec_values", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_product_utilisations", "p_products", on_update: :restrict, on_delete: :restrict - add_foreign_key "p_product_utilisations", "p_utilisations", on_update: :restrict, on_delete: :restrict - add_foreign_key "partition_lines", "partitions", on_update: :restrict, on_delete: :restrict - add_foreign_key "partitions", "admins", on_update: :restrict, on_delete: :restrict - add_foreign_key "s_modules", "s_modules_states", on_update: :restrict, on_delete: :restrict + add_foreign_key "p_product_aromes", "p_aromes" + add_foreign_key "p_product_aromes", "p_products" + add_foreign_key "p_product_images", "image_files" + add_foreign_key "p_product_images", "p_product_refs" + add_foreign_key "p_product_images", "p_products" + add_foreign_key "p_product_nutris", "p_nutris" + add_foreign_key "p_product_nutris", "p_products" + add_foreign_key "p_product_origines", "p_origines" + add_foreign_key "p_product_origines", "p_products" + add_foreign_key "p_product_p_customer_cats", "p_customer_cats" + add_foreign_key "p_product_p_customer_cats", "p_products" + add_foreign_key "p_product_p_product_sub_cats", "p_product_sub_cats" + add_foreign_key "p_product_p_product_sub_cats", "p_products" + add_foreign_key "p_product_prices", "p_price_cats" + add_foreign_key "p_product_prices", "p_product_refs" + add_foreign_key "p_product_ref_price_histories", "p_product_refs" + add_foreign_key "p_product_ref_specs", "p_product_refs" + add_foreign_key "p_product_ref_specs", "p_spec_types" + add_foreign_key "p_product_ref_specs", "p_spec_values" + add_foreign_key "p_product_utilisations", "p_products" + add_foreign_key "p_product_utilisations", "p_utilisations" + add_foreign_key "partition_lines", "partitions" + add_foreign_key "partitions", "admins" + add_foreign_key "s_modules", "s_modules_states" add_foreign_key "sorecop_taxes", "sorecop_cats" - add_foreign_key "stat_lines", "p_commercials", on_update: :restrict, on_delete: :restrict - add_foreign_key "stat_lines", "p_customers", on_update: :restrict, on_delete: :restrict - add_foreign_key "stat_lines", "p_product_refs", on_update: :restrict, on_delete: :restrict - add_foreign_key "stat_lines", "p_products", on_update: :restrict, on_delete: :restrict - add_foreign_key "stock_movement_lines", "stock_movements", on_update: :restrict, on_delete: :restrict - add_foreign_key "timer_watchers", "admins", on_update: :restrict, on_delete: :restrict - add_foreign_key "tva_rates", "accounting_zones", on_update: :restrict, on_delete: :restrict - add_foreign_key "v_bdas", "volume_periodiques", on_update: :restrict, on_delete: :restrict + add_foreign_key "stat_lines", "p_commercials" + add_foreign_key "stat_lines", "p_customers" + add_foreign_key "stat_lines", "p_product_refs" + add_foreign_key "stat_lines", "p_products" + add_foreign_key "stock_movement_lines", "stock_movements" + add_foreign_key "timer_watchers", "admins" + add_foreign_key "tva_rates", "accounting_zones" + add_foreign_key "v_bdas", "volume_periodiques" end diff --git a/package-lock.json b/package-lock.json index 3156065..0e1795c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "arcom_app", + "name": "phone_app", "version": "1.0.0", "lockfileVersion": 1, "requires": true, diff --git a/package.json b/package.json index 7cd2e3e..f5dfdf8 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "arcom_app", + "name": "phone_app", "version": "1.0.0", "description": "== README", "main": "pdf.js", diff --git a/package.json.old b/package.json.old index 66058c8..26dc0d3 100644 --- a/package.json.old +++ b/package.json.old @@ -1,5 +1,5 @@ { - "name": "arcom_app", + "name": "phone_app", "private": true, "dependencies": { "@rails/actioncable": "^6.0.0-alpha", diff --git a/public/logo-prestaphone.png b/public/logo-prestaphone.png new file mode 100644 index 0000000..e88dc01 Binary files /dev/null and b/public/logo-prestaphone.png differ