diff --git a/sql/PostgreSQL/deploy/24/001-auto.sql b/sql/PostgreSQL/deploy/24/001-auto.sql new file mode 100644 index 0000000..044395d --- /dev/null +++ b/sql/PostgreSQL/deploy/24/001-auto.sql @@ -0,0 +1,1490 @@ +-- +-- Created by SQL::Translator::Producer::PostgreSQL +-- Created on Sun Aug 7 15:32:38 2016 +-- +; +-- +-- Table: addresses. +-- +CREATE TABLE "addresses" ( + "addresses_id" serial NOT NULL, + "users_id" integer NOT NULL, + "type" character varying(16) DEFAULT '' NOT NULL, + "archived" boolean DEFAULT '0' NOT NULL, + "first_name" character varying(255) DEFAULT '' NOT NULL, + "last_name" character varying(255) DEFAULT '' NOT NULL, + "company" character varying(255) DEFAULT '' NOT NULL, + "address" character varying(255) DEFAULT '' NOT NULL, + "address_2" character varying(255) DEFAULT '' NOT NULL, + "postal_code" character varying(255) DEFAULT '' NOT NULL, + "city" character varying(255) DEFAULT '' NOT NULL, + "phone" character varying(32) DEFAULT '' NOT NULL, + "states_id" integer, + "country_iso_code" character(2) NOT NULL, + "priority" integer DEFAULT 0 NOT NULL, + "created" timestamp NOT NULL, + "last_modified" timestamp NOT NULL, + "latitude" numeric(20), + "longitude" numeric(30), + PRIMARY KEY ("addresses_id") +); +CREATE INDEX "addresses_idx_country_iso_code" on "addresses" ("country_iso_code"); +CREATE INDEX "addresses_idx_states_id" on "addresses" ("states_id"); +CREATE INDEX "addresses_idx_users_id" on "addresses" ("users_id"); + +; +-- +-- Table: attribute_values. +-- +CREATE TABLE "attribute_values" ( + "attribute_values_id" serial NOT NULL, + "attributes_id" integer NOT NULL, + "value" character varying(255) NOT NULL, + "title" character varying(255) NOT NULL, + "priority" integer DEFAULT 0 NOT NULL, + PRIMARY KEY ("attribute_values_id"), + CONSTRAINT "attribute_values_attributes_id_value" UNIQUE ("attributes_id", "value") +); +CREATE INDEX "attribute_values_idx_attributes_id" on "attribute_values" ("attributes_id"); + +; +-- +-- Table: attributes. +-- +CREATE TABLE "attributes" ( + "attributes_id" serial NOT NULL, + "name" character varying(255) NOT NULL, + "type" character varying(255) DEFAULT '' NOT NULL, + "title" character varying(255) NOT NULL, + "dynamic" boolean DEFAULT '0' NOT NULL, + "priority" integer DEFAULT 0 NOT NULL, + PRIMARY KEY ("attributes_id"), + CONSTRAINT "attributes_name_type" UNIQUE ("name", "type") +); + +; +-- +-- Table: cart_products. +-- +CREATE TABLE "cart_products" ( + "cart_products_id" serial NOT NULL, + "carts_id" integer NOT NULL, + "sku" character varying(64) NOT NULL, + "cart_position" integer NOT NULL, + "quantity" integer DEFAULT 1 NOT NULL, + "combine" boolean DEFAULT '1' NOT NULL, + "extra" text, + "created" timestamp NOT NULL, + "last_modified" timestamp NOT NULL, + PRIMARY KEY ("cart_products_id") +); +CREATE INDEX "cart_products_idx_carts_id" on "cart_products" ("carts_id"); +CREATE INDEX "cart_products_idx_sku" on "cart_products" ("sku"); + +; +-- +-- Table: carts. +-- +CREATE TABLE "carts" ( + "carts_id" serial NOT NULL, + "name" character varying(255) DEFAULT '' NOT NULL, + "users_id" integer, + "sessions_id" character varying(255), + "created" timestamp NOT NULL, + "last_modified" timestamp NOT NULL, + PRIMARY KEY ("carts_id"), + CONSTRAINT "carts_name_sessions_id" UNIQUE ("name", "sessions_id") +); +CREATE INDEX "carts_idx_sessions_id" on "carts" ("sessions_id"); +CREATE INDEX "carts_idx_users_id" on "carts" ("users_id"); + +; +-- +-- Table: conferences. +-- +CREATE TABLE "conferences" ( + "conferences_id" serial NOT NULL, + "name" character varying(128) NOT NULL, + "uri" character varying(255), + "logo" character varying(255), + "email" character varying(255), + "start_date" date, + "end_date" date, + PRIMARY KEY ("conferences_id"), + CONSTRAINT "conferences_name" UNIQUE ("name") +); + +; +-- +-- Table: countries. +-- +CREATE TABLE "countries" ( + "country_iso_code" character(2) NOT NULL, + "scope" character varying(32) DEFAULT '' NOT NULL, + "name" character varying(255) NOT NULL, + "priority" integer DEFAULT 0 NOT NULL, + "show_states" boolean DEFAULT '0' NOT NULL, + "active" boolean DEFAULT '1' NOT NULL, + PRIMARY KEY ("country_iso_code") +); + +; +-- +-- Table: inventories. +-- +CREATE TABLE "inventories" ( + "sku" character varying(64) NOT NULL, + "quantity" integer DEFAULT 0 NOT NULL, + PRIMARY KEY ("sku") +); + +; +-- +-- Table: media_displays. +-- +CREATE TABLE "media_displays" ( + "media_displays_id" serial NOT NULL, + "media_types_id" integer NOT NULL, + "type" character varying(255) NOT NULL, + "name" character varying(255), + "path" character varying(255), + "size" character varying(255), + PRIMARY KEY ("media_displays_id"), + CONSTRAINT "media_types_id_type_unique" UNIQUE ("media_types_id", "type") +); +CREATE INDEX "media_displays_idx_media_types_id" on "media_displays" ("media_types_id"); + +; +-- +-- Table: media_products. +-- +CREATE TABLE "media_products" ( + "media_id" integer NOT NULL, + "sku" character varying(64) NOT NULL, + PRIMARY KEY ("media_id", "sku") +); +CREATE INDEX "media_products_idx_media_id" on "media_products" ("media_id"); +CREATE INDEX "media_products_idx_sku" on "media_products" ("sku"); + +; +-- +-- Table: media_types. +-- +CREATE TABLE "media_types" ( + "media_types_id" serial NOT NULL, + "type" character varying(32) NOT NULL, + PRIMARY KEY ("media_types_id"), + CONSTRAINT "media_types_type" UNIQUE ("type") +); + +; +-- +-- Table: merchandising_attributes. +-- +CREATE TABLE "merchandising_attributes" ( + "merchandising_attributes_id" serial NOT NULL, + "merchandising_products_id" integer NOT NULL, + "name" character varying(32) NOT NULL, + "value" text NOT NULL, + PRIMARY KEY ("merchandising_attributes_id") +); +CREATE INDEX "merchandising_attributes_idx_merchandising_products_id" on "merchandising_attributes" ("merchandising_products_id"); + +; +-- +-- Table: merchandising_products. +-- +CREATE TABLE "merchandising_products" ( + "merchandising_products_id" serial NOT NULL, + "sku" character varying(64) NOT NULL, + "sku_related" character varying(64), + "type" character varying(32) DEFAULT '' NOT NULL, + PRIMARY KEY ("merchandising_products_id"), + CONSTRAINT "merchandising_products_sku_sku_related_type" UNIQUE ("sku", "sku_related", "type") +); +CREATE INDEX "merchandising_products_idx_sku" on "merchandising_products" ("sku"); +CREATE INDEX "merchandising_products_idx_sku_related" on "merchandising_products" ("sku_related"); + +; +-- +-- Table: message_types. +-- +CREATE TABLE "message_types" ( + "message_types_id" serial NOT NULL, + "name" character varying(255) NOT NULL, + "active" boolean DEFAULT '1' NOT NULL, + PRIMARY KEY ("message_types_id"), + CONSTRAINT "message_types_name" UNIQUE ("name") +); + +; +-- +-- Table: navigation_attribute_values. +-- +CREATE TABLE "navigation_attribute_values" ( + "navigation_attribute_values_id" serial NOT NULL, + "navigation_attributes_id" integer NOT NULL, + "attribute_values_id" integer NOT NULL, + PRIMARY KEY ("navigation_attribute_values_id") +); +CREATE INDEX "navigation_attribute_values_idx_attribute_values_id" on "navigation_attribute_values" ("attribute_values_id"); +CREATE INDEX "navigation_attribute_values_idx_navigation_attributes_id" on "navigation_attribute_values" ("navigation_attributes_id"); + +; +-- +-- Table: navigation_attributes. +-- +CREATE TABLE "navigation_attributes" ( + "navigation_attributes_id" serial NOT NULL, + "navigation_id" integer NOT NULL, + "attributes_id" integer NOT NULL, + PRIMARY KEY ("navigation_attributes_id"), + CONSTRAINT "navigation_id_attributes_id" UNIQUE ("navigation_id", "attributes_id") +); +CREATE INDEX "navigation_attributes_idx_attributes_id" on "navigation_attributes" ("attributes_id"); +CREATE INDEX "navigation_attributes_idx_navigation_id" on "navigation_attributes" ("navigation_id"); + +; +-- +-- Table: navigation_products. +-- +CREATE TABLE "navigation_products" ( + "sku" character varying(64) NOT NULL, + "navigation_id" integer NOT NULL, + "type" character varying(16), + "priority" integer DEFAULT 0 NOT NULL, + PRIMARY KEY ("sku", "navigation_id") +); +CREATE INDEX "navigation_products_idx_navigation_id" on "navigation_products" ("navigation_id"); +CREATE INDEX "navigation_products_idx_sku" on "navigation_products" ("sku"); + +; +-- +-- Table: navigations. +-- +CREATE TABLE "navigations" ( + "navigation_id" serial NOT NULL, + "uri" character varying(255), + "type" character varying(32) DEFAULT '' NOT NULL, + "scope" character varying(32) DEFAULT '' NOT NULL, + "name" character varying(255) DEFAULT '' NOT NULL, + "description" character varying(1024) DEFAULT '' NOT NULL, + "alias" integer, + "parent_id" integer, + "priority" integer DEFAULT 0 NOT NULL, + "product_count" integer DEFAULT 0 NOT NULL, + "created" timestamp NOT NULL, + "last_modified" timestamp NOT NULL, + "active" boolean DEFAULT '1' NOT NULL, + PRIMARY KEY ("navigation_id"), + CONSTRAINT "navigations_uri" UNIQUE ("uri") +); +CREATE INDEX "navigations_idx_parent_id" on "navigations" ("parent_id"); + +; +-- +-- Table: orderlines. +-- +CREATE TABLE "orderlines" ( + "orderlines_id" serial NOT NULL, + "orders_id" integer NOT NULL, + "order_position" integer DEFAULT 0 NOT NULL, + "sku" character varying(64) NOT NULL, + "name" character varying(255) NOT NULL, + "short_description" character varying(500) DEFAULT '' NOT NULL, + "description" text NOT NULL, + "weight" numeric(10,3) DEFAULT 0 NOT NULL, + "quantity" integer NOT NULL, + "price" numeric(21,3) NOT NULL, + "subtotal" numeric(21,3) NOT NULL, + "shipping" numeric(21,3) DEFAULT 0 NOT NULL, + "handling" numeric(21,3) DEFAULT 0 NOT NULL, + "salestax" numeric(21,3) DEFAULT 0 NOT NULL, + "status" character varying(24) DEFAULT '' NOT NULL, + PRIMARY KEY ("orderlines_id") +); +CREATE INDEX "orderlines_idx_orders_id" on "orderlines" ("orders_id"); +CREATE INDEX "orderlines_idx_sku" on "orderlines" ("sku"); + +; +-- +-- Table: permissions. +-- +CREATE TABLE "permissions" ( + "permissions_id" serial NOT NULL, + "roles_id" integer NOT NULL, + "perm" character varying(255) NOT NULL, + PRIMARY KEY ("permissions_id") +); +CREATE INDEX "permissions_idx_roles_id" on "permissions" ("roles_id"); + +; +-- +-- Table: price_modifiers. +-- +CREATE TABLE "price_modifiers" ( + "price_modifiers_id" serial NOT NULL, + "sku" character varying(64) NOT NULL, + "quantity" integer DEFAULT 0 NOT NULL, + "roles_id" integer, + "price" numeric(21,3) NOT NULL, + "discount" numeric(7,4), + "start_date" date, + "end_date" date, + PRIMARY KEY ("price_modifiers_id") +); +CREATE INDEX "price_modifiers_idx_sku" on "price_modifiers" ("sku"); +CREATE INDEX "price_modifiers_idx_roles_id" on "price_modifiers" ("roles_id"); + +; +-- +-- Table: product_attribute_values. +-- +CREATE TABLE "product_attribute_values" ( + "product_attribute_values_id" serial NOT NULL, + "product_attributes_id" integer NOT NULL, + "attribute_values_id" integer NOT NULL, + PRIMARY KEY ("product_attribute_values_id") +); +CREATE INDEX "product_attribute_values_idx_attribute_values_id" on "product_attribute_values" ("attribute_values_id"); +CREATE INDEX "product_attribute_values_idx_product_attributes_id" on "product_attribute_values" ("product_attributes_id"); + +; +-- +-- Table: product_attributes. +-- +CREATE TABLE "product_attributes" ( + "product_attributes_id" serial NOT NULL, + "sku" character varying(64) NOT NULL, + "attributes_id" integer NOT NULL, + "canonical" boolean DEFAULT '1' NOT NULL, + PRIMARY KEY ("product_attributes_id"), + CONSTRAINT "sku_attributes_id" UNIQUE ("sku", "attributes_id") +); +CREATE INDEX "product_attributes_idx_attributes_id" on "product_attributes" ("attributes_id"); +CREATE INDEX "product_attributes_idx_sku" on "product_attributes" ("sku"); + +; +-- +-- Table: products. +-- +CREATE TABLE "products" ( + "sku" character varying(64) NOT NULL, + "manufacturer_sku" character varying(64), + "name" character varying(255) NOT NULL, + "short_description" character varying(500) DEFAULT '' NOT NULL, + "description" text NOT NULL, + "price" numeric(21,3) DEFAULT 0 NOT NULL, + "uri" character varying(255), + "weight" numeric(10,2) DEFAULT 0 NOT NULL, + "priority" integer DEFAULT 0 NOT NULL, + "gtin" character varying(32), + "canonical_sku" character varying(64), + "active" boolean DEFAULT '1' NOT NULL, + "inventory_exempt" boolean DEFAULT '0' NOT NULL, + "combine" boolean DEFAULT '1' NOT NULL, + "created" timestamp NOT NULL, + "last_modified" timestamp NOT NULL, + PRIMARY KEY ("sku"), + CONSTRAINT "products_gtin" UNIQUE ("gtin"), + CONSTRAINT "products_uri" UNIQUE ("uri") +); +CREATE INDEX "products_idx_canonical_sku" on "products" ("canonical_sku"); + +; +-- +-- Table: roles. +-- +CREATE TABLE "roles" ( + "roles_id" serial NOT NULL, + "name" character varying(32) NOT NULL, + "label" character varying(255) NOT NULL, + "description" text NOT NULL, + PRIMARY KEY ("roles_id"), + CONSTRAINT "roles_name" UNIQUE ("name") +); + +; +-- +-- Table: sessions. +-- +CREATE TABLE "sessions" ( + "sessions_id" character varying(255) NOT NULL, + "session_data" text NOT NULL, + "created" timestamp NOT NULL, + "last_modified" timestamp NOT NULL, + PRIMARY KEY ("sessions_id") +); + +; +-- +-- Table: settings. +-- +CREATE TABLE "settings" ( + "settings_id" serial NOT NULL, + "scope" character varying(32) NOT NULL, + "site" character varying(32) DEFAULT '' NOT NULL, + "name" character varying(32) NOT NULL, + "value" text NOT NULL, + "category" character varying(32) DEFAULT '' NOT NULL, + PRIMARY KEY ("settings_id") +); + +; +-- +-- Table: shipment_carriers. +-- +CREATE TABLE "shipment_carriers" ( + "shipment_carriers_id" serial NOT NULL, + "name" character varying(255) NOT NULL, + "title" character varying(255) DEFAULT '' NOT NULL, + "account_number" character varying(255) DEFAULT '' NOT NULL, + "active" boolean DEFAULT '1' NOT NULL, + PRIMARY KEY ("shipment_carriers_id") +); + +; +-- +-- Table: shipment_destinations. +-- +CREATE TABLE "shipment_destinations" ( + "shipment_destinations_id" serial NOT NULL, + "zones_id" integer NOT NULL, + "shipment_methods_id" integer NOT NULL, + "active" boolean DEFAULT '1' NOT NULL, + PRIMARY KEY ("shipment_destinations_id") +); +CREATE INDEX "shipment_destinations_idx_shipment_methods_id" on "shipment_destinations" ("shipment_methods_id"); +CREATE INDEX "shipment_destinations_idx_zones_id" on "shipment_destinations" ("zones_id"); + +; +-- +-- Table: shipment_methods. +-- +CREATE TABLE "shipment_methods" ( + "shipment_methods_id" serial NOT NULL, + "name" character varying(255) DEFAULT '' NOT NULL, + "title" character varying(255) DEFAULT '' NOT NULL, + "shipment_carriers_id" integer NOT NULL, + "active" boolean DEFAULT '1' NOT NULL, + "created" timestamp NOT NULL, + "last_modified" timestamp NOT NULL, + PRIMARY KEY ("shipment_methods_id") +); +CREATE INDEX "shipment_methods_idx_shipment_carriers_id" on "shipment_methods" ("shipment_carriers_id"); + +; +-- +-- Table: shipment_rates. +-- +CREATE TABLE "shipment_rates" ( + "shipment_rates_id" serial NOT NULL, + "zones_id" integer NOT NULL, + "shipment_methods_id" integer NOT NULL, + "value_type" character varying(64), + "value_unit" character varying(64), + "min_value" numeric(10,2) DEFAULT 0 NOT NULL, + "max_value" numeric(10,2) DEFAULT 0 NOT NULL, + "price" numeric(21,3) DEFAULT 0 NOT NULL, + "valid_from" date NOT NULL, + "valid_to" date, + "created" timestamp NOT NULL, + "last_modified" timestamp NOT NULL, + PRIMARY KEY ("shipment_rates_id") +); +CREATE INDEX "shipment_rates_idx_shipment_methods_id" on "shipment_rates" ("shipment_methods_id"); +CREATE INDEX "shipment_rates_idx_zones_id" on "shipment_rates" ("zones_id"); + +; +-- +-- Table: shipments. +-- +CREATE TABLE "shipments" ( + "shipments_id" serial NOT NULL, + "tracking_number" character varying(255) DEFAULT '' NOT NULL, + "shipment_carriers_id" integer NOT NULL, + "shipment_methods_id" integer NOT NULL, + "created" timestamp NOT NULL, + "last_modified" timestamp NOT NULL, + PRIMARY KEY ("shipments_id") +); +CREATE INDEX "shipments_idx_shipment_carriers_id" on "shipments" ("shipment_carriers_id"); +CREATE INDEX "shipments_idx_shipment_methods_id" on "shipments" ("shipment_methods_id"); + +; +-- +-- Table: states. +-- +CREATE TABLE "states" ( + "states_id" serial NOT NULL, + "scope" character varying(32) DEFAULT '' NOT NULL, + "country_iso_code" character(2) NOT NULL, + "state_iso_code" character varying(6) DEFAULT '' NOT NULL, + "name" character varying(255) DEFAULT '' NOT NULL, + "priority" integer DEFAULT 0 NOT NULL, + "active" boolean DEFAULT '1' NOT NULL, + PRIMARY KEY ("states_id"), + CONSTRAINT "states_state_country" UNIQUE ("country_iso_code", "state_iso_code") +); +CREATE INDEX "states_idx_country_iso_code" on "states" ("country_iso_code"); + +; +-- +-- Table: taxes. +-- +CREATE TABLE "taxes" ( + "taxes_id" serial NOT NULL, + "tax_name" character varying(64) NOT NULL, + "description" character varying(64) NOT NULL, + "percent" numeric(7,4) NOT NULL, + "decimal_places" integer DEFAULT 2 NOT NULL, + "rounding" character(1), + "valid_from" date NOT NULL, + "valid_to" date, + "country_iso_code" character(2), + "states_id" integer, + "created" timestamp NOT NULL, + "last_modified" timestamp NOT NULL, + PRIMARY KEY ("taxes_id") +); +CREATE INDEX "taxes_idx_country_iso_code" on "taxes" ("country_iso_code"); +CREATE INDEX "taxes_idx_states_id" on "taxes" ("states_id"); +CREATE INDEX "taxes_idx_tax_name" on "taxes" ("tax_name"); +CREATE INDEX "taxes_idx_valid_from" on "taxes" ("valid_from"); +CREATE INDEX "taxes_idx_valid_to" on "taxes" ("valid_to"); + +; +-- +-- Table: uri_redirects. +-- +CREATE TABLE "uri_redirects" ( + "uri_source" character varying(255) NOT NULL, + "uri_target" character varying(255) NOT NULL, + "status_code" integer DEFAULT 301 NOT NULL, + "created" timestamp NOT NULL, + "last_used" timestamp NOT NULL, + PRIMARY KEY ("uri_source") +); + +; +-- +-- Table: user_attribute_values. +-- +CREATE TABLE "user_attribute_values" ( + "user_attribute_values_id" serial NOT NULL, + "user_attributes_id" integer NOT NULL, + "attribute_values_id" integer NOT NULL, + PRIMARY KEY ("user_attribute_values_id") +); +CREATE INDEX "user_attribute_values_idx_attribute_values_id" on "user_attribute_values" ("attribute_values_id"); +CREATE INDEX "user_attribute_values_idx_user_attributes_id" on "user_attribute_values" ("user_attributes_id"); + +; +-- +-- Table: user_attributes. +-- +CREATE TABLE "user_attributes" ( + "user_attributes_id" serial NOT NULL, + "users_id" integer NOT NULL, + "attributes_id" integer NOT NULL, + PRIMARY KEY ("user_attributes_id"), + CONSTRAINT "users_id_attributes_id" UNIQUE ("users_id", "attributes_id") +); +CREATE INDEX "user_attributes_idx_attributes_id" on "user_attributes" ("attributes_id"); +CREATE INDEX "user_attributes_idx_users_id" on "user_attributes" ("users_id"); + +; +-- +-- Table: zone_countries. +-- +CREATE TABLE "zone_countries" ( + "zones_id" integer NOT NULL, + "country_iso_code" character(2) NOT NULL, + PRIMARY KEY ("zones_id", "country_iso_code") +); +CREATE INDEX "zone_countries_idx_country_iso_code" on "zone_countries" ("country_iso_code"); +CREATE INDEX "zone_countries_idx_zones_id" on "zone_countries" ("zones_id"); + +; +-- +-- Table: zone_states. +-- +CREATE TABLE "zone_states" ( + "zones_id" integer NOT NULL, + "states_id" integer NOT NULL, + PRIMARY KEY ("zones_id", "states_id") +); +CREATE INDEX "zone_states_idx_states_id" on "zone_states" ("states_id"); +CREATE INDEX "zone_states_idx_zones_id" on "zone_states" ("zones_id"); + +; +-- +-- Table: zones. +-- +CREATE TABLE "zones" ( + "zones_id" serial NOT NULL, + "zone" character varying(255) NOT NULL, + "created" timestamp NOT NULL, + "last_modified" timestamp NOT NULL, + PRIMARY KEY ("zones_id"), + CONSTRAINT "zones_zone" UNIQUE ("zone") +); + +; +-- +-- Table: events. +-- +CREATE TABLE "events" ( + "events_id" serial NOT NULL, + "conferences_id" integer NOT NULL, + "duration" smallint NOT NULL, + "title" character varying(255) NOT NULL, + "abstract" character varying(2048) DEFAULT '' NOT NULL, + "url" character varying(255) DEFAULT '' NOT NULL, + "scheduled" boolean DEFAULT '0' NOT NULL, + "start_time" timestamp, + "room" character varying(128) DEFAULT '' NOT NULL, + PRIMARY KEY ("events_id") +); +CREATE INDEX "events_idx_conferences_id" on "events" ("conferences_id"); + +; +-- +-- Table: orders. +-- +CREATE TABLE "orders" ( + "orders_id" serial NOT NULL, + "order_number" character varying(24) NOT NULL, + "order_date" timestamp, + "users_id" integer NOT NULL, + "email" character varying(255) DEFAULT '' NOT NULL, + "shipping_addresses_id" integer NOT NULL, + "billing_addresses_id" integer NOT NULL, + "weight" numeric(11,3) DEFAULT 0 NOT NULL, + "payment_method" character varying(255) DEFAULT '' NOT NULL, + "payment_number" character varying(255) DEFAULT '' NOT NULL, + "payment_status" character varying(255) DEFAULT '' NOT NULL, + "shipping_method" character varying(255) DEFAULT '' NOT NULL, + "subtotal" numeric(21,3) DEFAULT 0 NOT NULL, + "shipping" numeric(21,3) DEFAULT 0 NOT NULL, + "handling" numeric(21,3) DEFAULT 0 NOT NULL, + "salestax" numeric(21,3) DEFAULT 0 NOT NULL, + "total_cost" numeric(21,3) DEFAULT 0 NOT NULL, + PRIMARY KEY ("orders_id"), + CONSTRAINT "orders_order_number" UNIQUE ("order_number") +); +CREATE INDEX "orders_idx_billing_addresses_id" on "orders" ("billing_addresses_id"); +CREATE INDEX "orders_idx_shipping_addresses_id" on "orders" ("shipping_addresses_id"); +CREATE INDEX "orders_idx_users_id" on "orders" ("users_id"); + +; +-- +-- Table: payment_orders. +-- +CREATE TABLE "payment_orders" ( + "payment_orders_id" serial NOT NULL, + "payment_mode" character varying(32) DEFAULT '' NOT NULL, + "payment_action" character varying(32) DEFAULT '' NOT NULL, + "payment_id" character varying(32) DEFAULT '' NOT NULL, + "auth_code" character varying(255) DEFAULT '' NOT NULL, + "users_id" integer, + "sessions_id" character varying(255), + "orders_id" integer, + "amount" numeric(21,3) DEFAULT 0 NOT NULL, + "status" character varying(32) DEFAULT '' NOT NULL, + "payment_sessions_id" character varying(255) DEFAULT '' NOT NULL, + "payment_error_code" character varying(32) DEFAULT '' NOT NULL, + "payment_error_message" text, + "payment_fee" numeric(12,3) DEFAULT 0 NOT NULL, + "created" timestamp NOT NULL, + "last_modified" timestamp NOT NULL, + PRIMARY KEY ("payment_orders_id") +); +CREATE INDEX "payment_orders_idx_orders_id" on "payment_orders" ("orders_id"); +CREATE INDEX "payment_orders_idx_sessions_id" on "payment_orders" ("sessions_id"); +CREATE INDEX "payment_orders_idx_users_id" on "payment_orders" ("users_id"); + +; +-- +-- Table: users. +-- +CREATE TABLE "users" ( + "users_id" serial NOT NULL, + "username" character varying(255) NOT NULL, + "nickname" character varying(255), + "email" character varying(255) DEFAULT '' NOT NULL, + "password" character varying(2048) DEFAULT '*' NOT NULL, + "first_name" character varying(255) DEFAULT '' NOT NULL, + "last_name" character varying(255) DEFAULT '' NOT NULL, + "last_login" timestamp, + "fail_count" integer DEFAULT 0 NOT NULL, + "reset_expires" timestamp, + "reset_token" character varying(255), + "is_anonymous" boolean DEFAULT '0' NOT NULL, + "created" timestamp NOT NULL, + "last_modified" timestamp NOT NULL, + "active" boolean DEFAULT '1' NOT NULL, + "bio" character varying(2048) DEFAULT '' NOT NULL, + "media_id" integer, + "monger_groups" character varying(256) DEFAULT '' NOT NULL, + "pause_id" character varying(128) DEFAULT '' NOT NULL, + "guru_level" integer DEFAULT 0 NOT NULL, + "t_shirt_size" character varying(8), + PRIMARY KEY ("users_id"), + CONSTRAINT "users_nickname" UNIQUE ("nickname"), + CONSTRAINT "users_username" UNIQUE ("username") +); +CREATE INDEX "users_idx_media_id" on "users" ("media_id"); +CREATE INDEX "users_idx_reset_token" on "users" ("reset_token"); + +; +-- +-- Table: conference_tickets. +-- +CREATE TABLE "conference_tickets" ( + "conferences_id" integer NOT NULL, + "sku" character varying(64) NOT NULL, + PRIMARY KEY ("conferences_id", "sku") +); +CREATE INDEX "conference_tickets_idx_conferences_id" on "conference_tickets" ("conferences_id"); +CREATE INDEX "conference_tickets_idx_sku" on "conference_tickets" ("sku"); + +; +-- +-- Table: medias. +-- +CREATE TABLE "medias" ( + "media_id" serial NOT NULL, + "file" character varying(255), + "uri" character varying(255) DEFAULT '' NOT NULL, + "mime_type" character varying(255) DEFAULT '' NOT NULL, + "label" character varying(255) DEFAULT '' NOT NULL, + "author_users_id" integer, + "created" timestamp NOT NULL, + "last_modified" timestamp NOT NULL, + "active" boolean DEFAULT '1' NOT NULL, + "media_types_id" integer NOT NULL, + "priority" integer DEFAULT 0 NOT NULL, + PRIMARY KEY ("media_id"), + CONSTRAINT "media_id_media_types_id_unique" UNIQUE ("media_id", "media_types_id"), + CONSTRAINT "medias_file" UNIQUE ("file") +); +CREATE INDEX "medias_idx_author_users_id" on "medias" ("author_users_id"); +CREATE INDEX "medias_idx_media_types_id" on "medias" ("media_types_id"); + +; +-- +-- Table: order_statuses. +-- +CREATE TABLE "order_statuses" ( + "order_status_id" serial NOT NULL, + "orders_id" integer NOT NULL, + "status" character varying(32) NOT NULL, + "created" timestamp NOT NULL, + PRIMARY KEY ("order_status_id") +); +CREATE INDEX "order_statuses_idx_orders_id" on "order_statuses" ("orders_id"); + +; +-- +-- Table: user_roles. +-- +CREATE TABLE "user_roles" ( + "users_id" integer NOT NULL, + "roles_id" integer NOT NULL, + PRIMARY KEY ("users_id", "roles_id") +); +CREATE INDEX "user_roles_idx_roles_id" on "user_roles" ("roles_id"); +CREATE INDEX "user_roles_idx_users_id" on "user_roles" ("users_id"); + +; +-- +-- Table: conference_attendees. +-- +CREATE TABLE "conference_attendees" ( + "conferences_id" integer NOT NULL, + "users_id" integer NOT NULL, + "confirmed" boolean DEFAULT '0' NOT NULL, + PRIMARY KEY ("conferences_id", "users_id") +); +CREATE INDEX "conference_attendees_idx_conferences_id" on "conference_attendees" ("conferences_id"); +CREATE INDEX "conference_attendees_idx_users_id" on "conference_attendees" ("users_id"); + +; +-- +-- Table: messages. +-- +CREATE TABLE "messages" ( + "messages_id" serial NOT NULL, + "title" character varying(255) DEFAULT '' NOT NULL, + "message_types_id" integer NOT NULL, + "uri" character varying(255), + "format" character varying(32) DEFAULT 'plain' NOT NULL, + "content" text NOT NULL, + "summary" character varying(1024) DEFAULT '' NOT NULL, + "author_users_id" integer, + "rating" numeric(4,2) DEFAULT 0 NOT NULL, + "recommend" boolean, + "public" boolean DEFAULT '0' NOT NULL, + "approved" boolean DEFAULT '0' NOT NULL, + "approved_by_users_id" integer, + "parent_id" integer, + "created" timestamp NOT NULL, + "last_modified" timestamp NOT NULL, + "tags" character varying(256) DEFAULT '' NOT NULL, + PRIMARY KEY ("messages_id"), + CONSTRAINT "messages_uri" UNIQUE ("uri") +); +CREATE INDEX "messages_idx_parent_id" on "messages" ("parent_id"); +CREATE INDEX "messages_idx_approved_by_users_id" on "messages" ("approved_by_users_id"); +CREATE INDEX "messages_idx_author_users_id" on "messages" ("author_users_id"); +CREATE INDEX "messages_idx_message_types_id" on "messages" ("message_types_id"); + +; +-- +-- Table: orderlines_shippings. +-- +CREATE TABLE "orderlines_shippings" ( + "orderlines_id" integer NOT NULL, + "addresses_id" integer NOT NULL, + "shipments_id" integer NOT NULL, + "quantity" integer NOT NULL, + PRIMARY KEY ("orderlines_id", "addresses_id", "shipments_id") +); +CREATE INDEX "orderlines_shippings_idx_addresses_id" on "orderlines_shippings" ("addresses_id"); +CREATE INDEX "orderlines_shippings_idx_orderlines_id" on "orderlines_shippings" ("orderlines_id"); +CREATE INDEX "orderlines_shippings_idx_shipments_id" on "orderlines_shippings" ("shipments_id"); + +; +-- +-- Table: surveys. +-- +CREATE TABLE "surveys" ( + "survey_id" serial NOT NULL, + "title" character varying(255) NOT NULL, + "conferences_id" integer NOT NULL, + "author_id" integer NOT NULL, + "public" boolean DEFAULT '0' NOT NULL, + "closed" boolean DEFAULT '0' NOT NULL, + "created" timestamp NOT NULL, + "last_modified" timestamp NOT NULL, + "priority" integer DEFAULT 0 NOT NULL, + PRIMARY KEY ("survey_id"), + CONSTRAINT "surveys_conferences_id_title" UNIQUE ("conferences_id", "title") +); +CREATE INDEX "surveys_idx_author_id" on "surveys" ("author_id"); +CREATE INDEX "surveys_idx_conferences_id" on "surveys" ("conferences_id"); + +; +-- +-- Table: media_navigations. +-- +CREATE TABLE "media_navigations" ( + "media_id" integer NOT NULL, + "navigation_id" integer NOT NULL, + PRIMARY KEY ("media_id", "navigation_id") +); +CREATE INDEX "media_navigations_idx_media_id" on "media_navigations" ("media_id"); +CREATE INDEX "media_navigations_idx_navigation_id" on "media_navigations" ("navigation_id"); + +; +-- +-- Table: survey_sections. +-- +CREATE TABLE "survey_sections" ( + "survey_section_id" serial NOT NULL, + "title" character varying(255) NOT NULL, + "description" character varying(2048) DEFAULT '' NOT NULL, + "priority" integer NOT NULL, + "survey_id" integer NOT NULL, + PRIMARY KEY ("survey_section_id") +); +CREATE INDEX "survey_sections_idx_survey_id" on "survey_sections" ("survey_id"); + +; +-- +-- Table: talks. +-- +CREATE TABLE "talks" ( + "talks_id" serial NOT NULL, + "author_id" integer, + "conferences_id" integer NOT NULL, + "duration" smallint NOT NULL, + "title" character varying(255) NOT NULL, + "tags" character varying(255) NOT NULL, + "abstract" character varying(2048) DEFAULT '' NOT NULL, + "url" character varying(255) DEFAULT '' NOT NULL, + "video_url" character varying(255) DEFAULT '' NOT NULL, + "comments" character varying(1024) DEFAULT '' NOT NULL, + "accepted" boolean DEFAULT '0' NOT NULL, + "confirmed" boolean DEFAULT '0' NOT NULL, + "lightning" boolean DEFAULT '0' NOT NULL, + "scheduled" boolean DEFAULT '0' NOT NULL, + "start_time" timestamp, + "room" character varying(128) DEFAULT '' NOT NULL, + "survey_id" integer, + PRIMARY KEY ("talks_id") +); +CREATE INDEX "talks_idx_author_id" on "talks" ("author_id"); +CREATE INDEX "talks_idx_conferences_id" on "talks" ("conferences_id"); +CREATE INDEX "talks_idx_survey_id" on "talks" ("survey_id"); + +; +-- +-- Table: user_surveys. +-- +CREATE TABLE "user_surveys" ( + "user_survey_id" serial NOT NULL, + "users_id" integer NOT NULL, + "survey_id" integer NOT NULL, + "completed" boolean DEFAULT '0' NOT NULL, + PRIMARY KEY ("user_survey_id"), + CONSTRAINT "users_id_survey_id" UNIQUE ("users_id", "survey_id") +); +CREATE INDEX "user_surveys_idx_survey_id" on "user_surveys" ("survey_id"); +CREATE INDEX "user_surveys_idx_users_id" on "user_surveys" ("users_id"); + +; +-- +-- Table: attendee_talks. +-- +CREATE TABLE "attendee_talks" ( + "users_id" integer NOT NULL, + "talks_id" integer NOT NULL, + PRIMARY KEY ("users_id", "talks_id") +); +CREATE INDEX "attendee_talks_idx_talks_id" on "attendee_talks" ("talks_id"); +CREATE INDEX "attendee_talks_idx_users_id" on "attendee_talks" ("users_id"); + +; +-- +-- Table: media_messages. +-- +CREATE TABLE "media_messages" ( + "media_id" integer NOT NULL, + "messages_id" integer NOT NULL, + PRIMARY KEY ("media_id", "messages_id") +); +CREATE INDEX "media_messages_idx_media_id" on "media_messages" ("media_id"); +CREATE INDEX "media_messages_idx_messages_id" on "media_messages" ("messages_id"); + +; +-- +-- Table: navigation_messages. +-- +CREATE TABLE "navigation_messages" ( + "messages_id" integer NOT NULL, + "navigation_id" integer NOT NULL, + PRIMARY KEY ("messages_id", "navigation_id") +); +CREATE INDEX "navigation_messages_idx_messages_id" on "navigation_messages" ("messages_id"); +CREATE INDEX "navigation_messages_idx_navigation_id" on "navigation_messages" ("navigation_id"); + +; +-- +-- Table: product_messages. +-- +CREATE TABLE "product_messages" ( + "messages_id" integer NOT NULL, + "sku" character varying(64) NOT NULL, + PRIMARY KEY ("messages_id", "sku") +); +CREATE INDEX "product_messages_idx_messages_id" on "product_messages" ("messages_id"); +CREATE INDEX "product_messages_idx_sku" on "product_messages" ("sku"); + +; +-- +-- Table: product_reviews. +-- +CREATE TABLE "product_reviews" ( + "messages_id" integer NOT NULL, + "sku" character varying(64) NOT NULL, + PRIMARY KEY ("messages_id", "sku") +); +CREATE INDEX "product_reviews_idx_messages_id" on "product_reviews" ("messages_id"); +CREATE INDEX "product_reviews_idx_sku" on "product_reviews" ("sku"); + +; +-- +-- Table: survey_questions. +-- +CREATE TABLE "survey_questions" ( + "survey_question_id" serial NOT NULL, + "title" character varying(255) NOT NULL, + "description" character varying(2048) DEFAULT '' NOT NULL, + "other" character varying(255) DEFAULT '' NOT NULL, + "type" character varying(16) NOT NULL, + "priority" integer NOT NULL, + "survey_section_id" integer NOT NULL, + PRIMARY KEY ("survey_question_id") +); +CREATE INDEX "survey_questions_idx_survey_section_id" on "survey_questions" ("survey_section_id"); + +; +-- +-- Table: order_comments. +-- +CREATE TABLE "order_comments" ( + "messages_id" integer NOT NULL, + "orders_id" integer NOT NULL, + PRIMARY KEY ("messages_id", "orders_id") +); +CREATE INDEX "order_comments_idx_messages_id" on "order_comments" ("messages_id"); +CREATE INDEX "order_comments_idx_orders_id" on "order_comments" ("orders_id"); + +; +-- +-- Table: survey_question_options. +-- +CREATE TABLE "survey_question_options" ( + "survey_question_option_id" serial NOT NULL, + "title" character varying(255) NOT NULL, + "priority" integer NOT NULL, + "survey_question_id" integer NOT NULL, + PRIMARY KEY ("survey_question_option_id") +); +CREATE INDEX "survey_question_options_idx_survey_question_id" on "survey_question_options" ("survey_question_id"); + +; +-- +-- Table: survey_responses. +-- +CREATE TABLE "survey_responses" ( + "survey_response_id" serial NOT NULL, + "user_survey_id" integer NOT NULL, + "survey_question_id" integer NOT NULL, + "other" text DEFAULT '' NOT NULL, + PRIMARY KEY ("survey_response_id"), + CONSTRAINT "user_survey_survey_question" UNIQUE ("user_survey_id", "survey_question_id") +); +CREATE INDEX "survey_responses_idx_survey_question_id" on "survey_responses" ("survey_question_id"); +CREATE INDEX "survey_responses_idx_user_survey_id" on "survey_responses" ("user_survey_id"); + +; +-- +-- Table: survey_response_options. +-- +CREATE TABLE "survey_response_options" ( + "survey_response_option_id" serial NOT NULL, + "survey_response_id" integer NOT NULL, + "survey_question_option_id" integer NOT NULL, + "value" integer, + PRIMARY KEY ("survey_response_option_id") +); +CREATE INDEX "survey_response_options_idx_survey_question_option_id" on "survey_response_options" ("survey_question_option_id"); +CREATE INDEX "survey_response_options_idx_survey_response_id" on "survey_response_options" ("survey_response_id"); + +; +-- +-- Foreign Key Definitions +-- + +; +ALTER TABLE "addresses" ADD CONSTRAINT "addresses_fk_country_iso_code" FOREIGN KEY ("country_iso_code") + REFERENCES "countries" ("country_iso_code") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "addresses" ADD CONSTRAINT "addresses_fk_states_id" FOREIGN KEY ("states_id") + REFERENCES "states" ("states_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "addresses" ADD CONSTRAINT "addresses_fk_users_id" FOREIGN KEY ("users_id") + REFERENCES "users" ("users_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "attribute_values" ADD CONSTRAINT "attribute_values_fk_attributes_id" FOREIGN KEY ("attributes_id") + REFERENCES "attributes" ("attributes_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "cart_products" ADD CONSTRAINT "cart_products_fk_carts_id" FOREIGN KEY ("carts_id") + REFERENCES "carts" ("carts_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "cart_products" ADD CONSTRAINT "cart_products_fk_sku" FOREIGN KEY ("sku") + REFERENCES "products" ("sku") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "carts" ADD CONSTRAINT "carts_fk_sessions_id" FOREIGN KEY ("sessions_id") + REFERENCES "sessions" ("sessions_id") ON DELETE SET NULL DEFERRABLE; + +; +ALTER TABLE "carts" ADD CONSTRAINT "carts_fk_users_id" FOREIGN KEY ("users_id") + REFERENCES "users" ("users_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "inventories" ADD CONSTRAINT "inventories_fk_sku" FOREIGN KEY ("sku") + REFERENCES "products" ("sku") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "media_displays" ADD CONSTRAINT "media_displays_fk_media_types_id" FOREIGN KEY ("media_types_id") + REFERENCES "media_types" ("media_types_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "media_products" ADD CONSTRAINT "media_products_fk_media_id" FOREIGN KEY ("media_id") + REFERENCES "medias" ("media_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "media_products" ADD CONSTRAINT "media_products_fk_sku" FOREIGN KEY ("sku") + REFERENCES "products" ("sku") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "merchandising_attributes" ADD CONSTRAINT "merchandising_attributes_fk_merchandising_products_id" FOREIGN KEY ("merchandising_products_id") + REFERENCES "merchandising_products" ("merchandising_products_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "merchandising_products" ADD CONSTRAINT "merchandising_products_fk_sku" FOREIGN KEY ("sku") + REFERENCES "products" ("sku") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "merchandising_products" ADD CONSTRAINT "merchandising_products_fk_sku_related" FOREIGN KEY ("sku_related") + REFERENCES "products" ("sku") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "navigation_attribute_values" ADD CONSTRAINT "navigation_attribute_values_fk_attribute_values_id" FOREIGN KEY ("attribute_values_id") + REFERENCES "attribute_values" ("attribute_values_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "navigation_attribute_values" ADD CONSTRAINT "navigation_attribute_values_fk_navigation_attributes_id" FOREIGN KEY ("navigation_attributes_id") + REFERENCES "navigation_attributes" ("navigation_attributes_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "navigation_attributes" ADD CONSTRAINT "navigation_attributes_fk_attributes_id" FOREIGN KEY ("attributes_id") + REFERENCES "attributes" ("attributes_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "navigation_attributes" ADD CONSTRAINT "navigation_attributes_fk_navigation_id" FOREIGN KEY ("navigation_id") + REFERENCES "navigations" ("navigation_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "navigation_products" ADD CONSTRAINT "navigation_products_fk_navigation_id" FOREIGN KEY ("navigation_id") + REFERENCES "navigations" ("navigation_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "navigation_products" ADD CONSTRAINT "navigation_products_fk_sku" FOREIGN KEY ("sku") + REFERENCES "products" ("sku") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "navigations" ADD CONSTRAINT "navigations_fk_parent_id" FOREIGN KEY ("parent_id") + REFERENCES "navigations" ("navigation_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "orderlines" ADD CONSTRAINT "orderlines_fk_orders_id" FOREIGN KEY ("orders_id") + REFERENCES "orders" ("orders_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "orderlines" ADD CONSTRAINT "orderlines_fk_sku" FOREIGN KEY ("sku") + REFERENCES "products" ("sku") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "permissions" ADD CONSTRAINT "permissions_fk_roles_id" FOREIGN KEY ("roles_id") + REFERENCES "roles" ("roles_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "price_modifiers" ADD CONSTRAINT "price_modifiers_fk_sku" FOREIGN KEY ("sku") + REFERENCES "products" ("sku") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "price_modifiers" ADD CONSTRAINT "price_modifiers_fk_roles_id" FOREIGN KEY ("roles_id") + REFERENCES "roles" ("roles_id") DEFERRABLE; + +; +ALTER TABLE "product_attribute_values" ADD CONSTRAINT "product_attribute_values_fk_attribute_values_id" FOREIGN KEY ("attribute_values_id") + REFERENCES "attribute_values" ("attribute_values_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "product_attribute_values" ADD CONSTRAINT "product_attribute_values_fk_product_attributes_id" FOREIGN KEY ("product_attributes_id") + REFERENCES "product_attributes" ("product_attributes_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "product_attributes" ADD CONSTRAINT "product_attributes_fk_attributes_id" FOREIGN KEY ("attributes_id") + REFERENCES "attributes" ("attributes_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "product_attributes" ADD CONSTRAINT "product_attributes_fk_sku" FOREIGN KEY ("sku") + REFERENCES "products" ("sku") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "products" ADD CONSTRAINT "products_fk_canonical_sku" FOREIGN KEY ("canonical_sku") + REFERENCES "products" ("sku") DEFERRABLE; + +; +ALTER TABLE "shipment_destinations" ADD CONSTRAINT "shipment_destinations_fk_shipment_methods_id" FOREIGN KEY ("shipment_methods_id") + REFERENCES "shipment_methods" ("shipment_methods_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "shipment_destinations" ADD CONSTRAINT "shipment_destinations_fk_zones_id" FOREIGN KEY ("zones_id") + REFERENCES "zones" ("zones_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "shipment_methods" ADD CONSTRAINT "shipment_methods_fk_shipment_carriers_id" FOREIGN KEY ("shipment_carriers_id") + REFERENCES "shipment_carriers" ("shipment_carriers_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "shipment_rates" ADD CONSTRAINT "shipment_rates_fk_shipment_methods_id" FOREIGN KEY ("shipment_methods_id") + REFERENCES "shipment_methods" ("shipment_methods_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "shipment_rates" ADD CONSTRAINT "shipment_rates_fk_zones_id" FOREIGN KEY ("zones_id") + REFERENCES "zones" ("zones_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "shipments" ADD CONSTRAINT "shipments_fk_shipment_carriers_id" FOREIGN KEY ("shipment_carriers_id") + REFERENCES "shipment_carriers" ("shipment_carriers_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "shipments" ADD CONSTRAINT "shipments_fk_shipment_methods_id" FOREIGN KEY ("shipment_methods_id") + REFERENCES "shipment_methods" ("shipment_methods_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "states" ADD CONSTRAINT "states_fk_country_iso_code" FOREIGN KEY ("country_iso_code") + REFERENCES "countries" ("country_iso_code") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "taxes" ADD CONSTRAINT "taxes_fk_country_iso_code" FOREIGN KEY ("country_iso_code") + REFERENCES "countries" ("country_iso_code") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "taxes" ADD CONSTRAINT "taxes_fk_states_id" FOREIGN KEY ("states_id") + REFERENCES "states" ("states_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "user_attribute_values" ADD CONSTRAINT "user_attribute_values_fk_attribute_values_id" FOREIGN KEY ("attribute_values_id") + REFERENCES "attribute_values" ("attribute_values_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "user_attribute_values" ADD CONSTRAINT "user_attribute_values_fk_user_attributes_id" FOREIGN KEY ("user_attributes_id") + REFERENCES "user_attributes" ("user_attributes_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "user_attributes" ADD CONSTRAINT "user_attributes_fk_attributes_id" FOREIGN KEY ("attributes_id") + REFERENCES "attributes" ("attributes_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "user_attributes" ADD CONSTRAINT "user_attributes_fk_users_id" FOREIGN KEY ("users_id") + REFERENCES "users" ("users_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "zone_countries" ADD CONSTRAINT "zone_countries_fk_country_iso_code" FOREIGN KEY ("country_iso_code") + REFERENCES "countries" ("country_iso_code") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "zone_countries" ADD CONSTRAINT "zone_countries_fk_zones_id" FOREIGN KEY ("zones_id") + REFERENCES "zones" ("zones_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "zone_states" ADD CONSTRAINT "zone_states_fk_states_id" FOREIGN KEY ("states_id") + REFERENCES "states" ("states_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "zone_states" ADD CONSTRAINT "zone_states_fk_zones_id" FOREIGN KEY ("zones_id") + REFERENCES "zones" ("zones_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "events" ADD CONSTRAINT "events_fk_conferences_id" FOREIGN KEY ("conferences_id") + REFERENCES "conferences" ("conferences_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "orders" ADD CONSTRAINT "orders_fk_billing_addresses_id" FOREIGN KEY ("billing_addresses_id") + REFERENCES "addresses" ("addresses_id") DEFERRABLE; + +; +ALTER TABLE "orders" ADD CONSTRAINT "orders_fk_shipping_addresses_id" FOREIGN KEY ("shipping_addresses_id") + REFERENCES "addresses" ("addresses_id") DEFERRABLE; + +; +ALTER TABLE "orders" ADD CONSTRAINT "orders_fk_users_id" FOREIGN KEY ("users_id") + REFERENCES "users" ("users_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "payment_orders" ADD CONSTRAINT "payment_orders_fk_orders_id" FOREIGN KEY ("orders_id") + REFERENCES "orders" ("orders_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "payment_orders" ADD CONSTRAINT "payment_orders_fk_sessions_id" FOREIGN KEY ("sessions_id") + REFERENCES "sessions" ("sessions_id") ON DELETE SET NULL DEFERRABLE; + +; +ALTER TABLE "payment_orders" ADD CONSTRAINT "payment_orders_fk_users_id" FOREIGN KEY ("users_id") + REFERENCES "users" ("users_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "users" ADD CONSTRAINT "users_fk_media_id" FOREIGN KEY ("media_id") + REFERENCES "medias" ("media_id") DEFERRABLE; + +; +ALTER TABLE "conference_tickets" ADD CONSTRAINT "conference_tickets_fk_conferences_id" FOREIGN KEY ("conferences_id") + REFERENCES "conferences" ("conferences_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "conference_tickets" ADD CONSTRAINT "conference_tickets_fk_sku" FOREIGN KEY ("sku") + REFERENCES "products" ("sku") ON DELETE CASCADE DEFERRABLE; + +; +ALTER TABLE "medias" ADD CONSTRAINT "medias_fk_author_users_id" FOREIGN KEY ("author_users_id") + REFERENCES "users" ("users_id") DEFERRABLE; + +; +ALTER TABLE "medias" ADD CONSTRAINT "medias_fk_media_types_id" FOREIGN KEY ("media_types_id") + REFERENCES "media_types" ("media_types_id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "order_statuses" ADD CONSTRAINT "order_statuses_fk_orders_id" FOREIGN KEY ("orders_id") + REFERENCES "orders" ("orders_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "user_roles" ADD CONSTRAINT "user_roles_fk_roles_id" FOREIGN KEY ("roles_id") + REFERENCES "roles" ("roles_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "user_roles" ADD CONSTRAINT "user_roles_fk_users_id" FOREIGN KEY ("users_id") + REFERENCES "users" ("users_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "conference_attendees" ADD CONSTRAINT "conference_attendees_fk_conferences_id" FOREIGN KEY ("conferences_id") + REFERENCES "conferences" ("conferences_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "conference_attendees" ADD CONSTRAINT "conference_attendees_fk_users_id" FOREIGN KEY ("users_id") + REFERENCES "users" ("users_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "messages" ADD CONSTRAINT "messages_fk_parent_id" FOREIGN KEY ("parent_id") + REFERENCES "messages" ("messages_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "messages" ADD CONSTRAINT "messages_fk_approved_by_users_id" FOREIGN KEY ("approved_by_users_id") + REFERENCES "users" ("users_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "messages" ADD CONSTRAINT "messages_fk_author_users_id" FOREIGN KEY ("author_users_id") + REFERENCES "users" ("users_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "messages" ADD CONSTRAINT "messages_fk_message_types_id" FOREIGN KEY ("message_types_id") + REFERENCES "message_types" ("message_types_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "orderlines_shippings" ADD CONSTRAINT "orderlines_shippings_fk_addresses_id" FOREIGN KEY ("addresses_id") + REFERENCES "addresses" ("addresses_id") DEFERRABLE; + +; +ALTER TABLE "orderlines_shippings" ADD CONSTRAINT "orderlines_shippings_fk_orderlines_id" FOREIGN KEY ("orderlines_id") + REFERENCES "orderlines" ("orderlines_id") DEFERRABLE; + +; +ALTER TABLE "orderlines_shippings" ADD CONSTRAINT "orderlines_shippings_fk_shipments_id" FOREIGN KEY ("shipments_id") + REFERENCES "shipments" ("shipments_id") DEFERRABLE; + +; +ALTER TABLE "surveys" ADD CONSTRAINT "surveys_fk_author_id" FOREIGN KEY ("author_id") + REFERENCES "users" ("users_id") DEFERRABLE; + +; +ALTER TABLE "surveys" ADD CONSTRAINT "surveys_fk_conferences_id" FOREIGN KEY ("conferences_id") + REFERENCES "conferences" ("conferences_id") DEFERRABLE; + +; +ALTER TABLE "media_navigations" ADD CONSTRAINT "media_navigations_fk_media_id" FOREIGN KEY ("media_id") + REFERENCES "medias" ("media_id") DEFERRABLE; + +; +ALTER TABLE "media_navigations" ADD CONSTRAINT "media_navigations_fk_navigation_id" FOREIGN KEY ("navigation_id") + REFERENCES "navigations" ("navigation_id") DEFERRABLE; + +; +ALTER TABLE "survey_sections" ADD CONSTRAINT "survey_sections_fk_survey_id" FOREIGN KEY ("survey_id") + REFERENCES "surveys" ("survey_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "talks" ADD CONSTRAINT "talks_fk_author_id" FOREIGN KEY ("author_id") + REFERENCES "users" ("users_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "talks" ADD CONSTRAINT "talks_fk_conferences_id" FOREIGN KEY ("conferences_id") + REFERENCES "conferences" ("conferences_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "talks" ADD CONSTRAINT "talks_fk_survey_id" FOREIGN KEY ("survey_id") + REFERENCES "surveys" ("survey_id") ON DELETE SET NULL DEFERRABLE; + +; +ALTER TABLE "user_surveys" ADD CONSTRAINT "user_surveys_fk_survey_id" FOREIGN KEY ("survey_id") + REFERENCES "surveys" ("survey_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "user_surveys" ADD CONSTRAINT "user_surveys_fk_users_id" FOREIGN KEY ("users_id") + REFERENCES "users" ("users_id") DEFERRABLE; + +; +ALTER TABLE "attendee_talks" ADD CONSTRAINT "attendee_talks_fk_talks_id" FOREIGN KEY ("talks_id") + REFERENCES "talks" ("talks_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "attendee_talks" ADD CONSTRAINT "attendee_talks_fk_users_id" FOREIGN KEY ("users_id") + REFERENCES "users" ("users_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "media_messages" ADD CONSTRAINT "media_messages_fk_media_id" FOREIGN KEY ("media_id") + REFERENCES "medias" ("media_id") DEFERRABLE; + +; +ALTER TABLE "media_messages" ADD CONSTRAINT "media_messages_fk_messages_id" FOREIGN KEY ("messages_id") + REFERENCES "messages" ("messages_id") DEFERRABLE; + +; +ALTER TABLE "navigation_messages" ADD CONSTRAINT "navigation_messages_fk_messages_id" FOREIGN KEY ("messages_id") + REFERENCES "messages" ("messages_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "navigation_messages" ADD CONSTRAINT "navigation_messages_fk_navigation_id" FOREIGN KEY ("navigation_id") + REFERENCES "navigations" ("navigation_id") ON DELETE CASCADE DEFERRABLE; + +; +ALTER TABLE "product_messages" ADD CONSTRAINT "product_messages_fk_messages_id" FOREIGN KEY ("messages_id") + REFERENCES "messages" ("messages_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "product_messages" ADD CONSTRAINT "product_messages_fk_sku" FOREIGN KEY ("sku") + REFERENCES "products" ("sku") ON DELETE CASCADE DEFERRABLE; + +; +ALTER TABLE "product_reviews" ADD CONSTRAINT "product_reviews_fk_messages_id" FOREIGN KEY ("messages_id") + REFERENCES "messages" ("messages_id") DEFERRABLE; + +; +ALTER TABLE "product_reviews" ADD CONSTRAINT "product_reviews_fk_sku" FOREIGN KEY ("sku") + REFERENCES "products" ("sku") DEFERRABLE; + +; +ALTER TABLE "survey_questions" ADD CONSTRAINT "survey_questions_fk_survey_section_id" FOREIGN KEY ("survey_section_id") + REFERENCES "survey_sections" ("survey_section_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "order_comments" ADD CONSTRAINT "order_comments_fk_messages_id" FOREIGN KEY ("messages_id") + REFERENCES "messages" ("messages_id") ON DELETE CASCADE DEFERRABLE; + +; +ALTER TABLE "order_comments" ADD CONSTRAINT "order_comments_fk_orders_id" FOREIGN KEY ("orders_id") + REFERENCES "orders" ("orders_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "survey_question_options" ADD CONSTRAINT "survey_question_options_fk_survey_question_id" FOREIGN KEY ("survey_question_id") + REFERENCES "survey_questions" ("survey_question_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "survey_responses" ADD CONSTRAINT "survey_responses_fk_survey_question_id" FOREIGN KEY ("survey_question_id") + REFERENCES "survey_questions" ("survey_question_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "survey_responses" ADD CONSTRAINT "survey_responses_fk_user_survey_id" FOREIGN KEY ("user_survey_id") + REFERENCES "user_surveys" ("user_survey_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "survey_response_options" ADD CONSTRAINT "survey_response_options_fk_survey_question_option_id" FOREIGN KEY ("survey_question_option_id") + REFERENCES "survey_question_options" ("survey_question_option_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; +ALTER TABLE "survey_response_options" ADD CONSTRAINT "survey_response_options_fk_survey_response_id" FOREIGN KEY ("survey_response_id") + REFERENCES "survey_responses" ("survey_response_id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE; + +; diff --git a/sql/PostgreSQL/upgrade/23-24/001-auto.sql b/sql/PostgreSQL/upgrade/23-24/001-auto.sql new file mode 100644 index 0000000..3cee7bb --- /dev/null +++ b/sql/PostgreSQL/upgrade/23-24/001-auto.sql @@ -0,0 +1,18 @@ +-- Convert schema 'sql/_source/deploy/23/001-auto.yml' to 'sql/_source/deploy/24/001-auto.yml':; + +; +BEGIN; + +; +ALTER TABLE conferences ADD COLUMN uri character varying(255); + +; +ALTER TABLE conferences ADD COLUMN logo character varying(255); + +; +ALTER TABLE conferences ADD COLUMN email character varying(255); + +; + +COMMIT; + diff --git a/sql/_common/upgrade/23-24/001-populate-new-conference-fields.pl b/sql/_common/upgrade/23-24/001-populate-new-conference-fields.pl new file mode 100644 index 0000000..7c49b90 --- /dev/null +++ b/sql/_common/upgrade/23-24/001-populate-new-conference-fields.pl @@ -0,0 +1,23 @@ +#!perl + +# add extra fields for existing conferences +sub { + my $schema = shift; + + $schema->resultset('Conference')->find({ + name => 'Perl Dancer Conference 2015' + })->update({ + uri => 'https://www.perl.dance/2015/', + logo => 'img/perl-dancer-2015-logo.png', + email => '2015@perl.dance', + }); + + $schema->resultset('Conference')->find({ + name => 'Perl Dancer Conference 2016' + })->update({ + uri => 'https://www.perl.dance/', + logo => 'img/perl-dancer-2016-logo.png', + email => '2016@perl.dance', + }); +}; + diff --git a/sql/_source/deploy/24/001-auto.yml b/sql/_source/deploy/24/001-auto.yml new file mode 100644 index 0000000..2c2df7e --- /dev/null +++ b/sql/_source/deploy/24/001-auto.yml @@ -0,0 +1,7730 @@ +--- +schema: + procedures: {} + tables: + addresses: + constraints: + - deferrable: 1 + expression: '' + fields: + - addresses_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - country_iso_code + match_type: '' + name: addresses_fk_country_iso_code + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - country_iso_code + reference_table: countries + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - states_id + match_type: '' + name: addresses_fk_states_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - states_id + reference_table: states + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - users_id + match_type: '' + name: addresses_fk_users_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - users_id + reference_table: users + type: FOREIGN KEY + fields: + address: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: address + order: 8 + size: + - 255 + address_2: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: address_2 + order: 9 + size: + - 255 + addresses_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: addresses_id + order: 1 + size: + - 0 + archived: + data_type: boolean + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: archived + order: 4 + size: + - 0 + city: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: city + order: 11 + size: + - 255 + company: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: company + order: 7 + size: + - 255 + country_iso_code: + data_type: char + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: country_iso_code + order: 14 + size: + - 2 + created: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: created + order: 16 + size: + - 0 + first_name: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: first_name + order: 5 + size: + - 255 + last_modified: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: last_modified + order: 17 + size: + - 0 + last_name: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: last_name + order: 6 + size: + - 255 + latitude: + data_type: float + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: latitude + order: 18 + size: + - 20 + longitude: + data_type: float + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: longitude + order: 19 + size: + - 30 + phone: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: phone + order: 12 + size: + - 32 + postal_code: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: postal_code + order: 10 + size: + - 255 + priority: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: priority + order: 15 + size: + - 0 + states_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: states_id + order: 13 + size: + - 0 + type: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: type + order: 3 + size: + - 16 + users_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: users_id + order: 2 + size: + - 0 + indices: + - fields: + - country_iso_code + name: addresses_idx_country_iso_code + options: [] + type: NORMAL + - fields: + - states_id + name: addresses_idx_states_id + options: [] + type: NORMAL + - fields: + - users_id + name: addresses_idx_users_id + options: [] + type: NORMAL + name: addresses + options: [] + order: 1 + attendee_talks: + constraints: + - deferrable: 1 + expression: '' + fields: + - users_id + - talks_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - talks_id + match_type: '' + name: attendee_talks_fk_talks_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - talks_id + reference_table: talks + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - users_id + match_type: '' + name: attendee_talks_fk_users_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - users_id + reference_table: users + type: FOREIGN KEY + fields: + talks_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: talks_id + order: 2 + size: + - 0 + users_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: users_id + order: 1 + size: + - 0 + indices: + - fields: + - talks_id + name: attendee_talks_idx_talks_id + options: [] + type: NORMAL + - fields: + - users_id + name: attendee_talks_idx_users_id + options: [] + type: NORMAL + name: attendee_talks + options: [] + order: 57 + attribute_values: + constraints: + - deferrable: 1 + expression: '' + fields: + - attribute_values_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - attributes_id + - value + match_type: '' + name: attribute_values_attributes_id_value + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - attributes_id + match_type: '' + name: attribute_values_fk_attributes_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - attributes_id + reference_table: attributes + type: FOREIGN KEY + fields: + attribute_values_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: attribute_values_id + order: 1 + size: + - 0 + attributes_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: attributes_id + order: 2 + size: + - 0 + priority: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: priority + order: 5 + size: + - 0 + title: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: title + order: 4 + size: + - 255 + value: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: value + order: 3 + size: + - 255 + indices: + - fields: + - attributes_id + name: attribute_values_idx_attributes_id + options: [] + type: NORMAL + name: attribute_values + options: [] + order: 2 + attributes: + constraints: + - deferrable: 1 + expression: '' + fields: + - attributes_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - name + - type + match_type: '' + name: attributes_name_type + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + fields: + attributes_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: attributes_id + order: 1 + size: + - 0 + dynamic: + data_type: boolean + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: dynamic + order: 5 + size: + - 0 + name: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: name + order: 2 + size: + - 255 + priority: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: priority + order: 6 + size: + - 0 + title: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: title + order: 4 + size: + - 255 + type: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: type + order: 3 + size: + - 255 + indices: [] + name: attributes + options: [] + order: 3 + cart_products: + constraints: + - deferrable: 1 + expression: '' + fields: + - cart_products_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - carts_id + match_type: '' + name: cart_products_fk_carts_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - carts_id + reference_table: carts + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - sku + match_type: '' + name: cart_products_fk_sku + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - sku + reference_table: products + type: FOREIGN KEY + fields: + cart_position: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: cart_position + order: 4 + size: + - 0 + cart_products_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: cart_products_id + order: 1 + size: + - 0 + carts_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: carts_id + order: 2 + size: + - 0 + combine: + data_type: boolean + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: combine + order: 6 + size: + - 0 + created: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: created + order: 8 + size: + - 0 + extra: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: extra + order: 7 + size: + - 0 + last_modified: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: last_modified + order: 9 + size: + - 0 + quantity: + data_type: integer + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: quantity + order: 5 + size: + - 0 + sku: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: sku + order: 3 + size: + - 64 + indices: + - fields: + - carts_id + name: cart_products_idx_carts_id + options: [] + type: NORMAL + - fields: + - sku + name: cart_products_idx_sku + options: [] + type: NORMAL + name: cart_products + options: [] + order: 4 + carts: + constraints: + - deferrable: 1 + expression: '' + fields: + - carts_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - name + - sessions_id + match_type: '' + name: carts_name_sessions_id + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - sessions_id + match_type: '' + name: carts_fk_sessions_id + on_delete: SET NULL + on_update: '' + options: [] + reference_fields: + - sessions_id + reference_table: sessions + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - users_id + match_type: '' + name: carts_fk_users_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - users_id + reference_table: users + type: FOREIGN KEY + fields: + carts_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: carts_id + order: 1 + size: + - 0 + created: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: created + order: 5 + size: + - 0 + last_modified: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: last_modified + order: 6 + size: + - 0 + name: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: name + order: 2 + size: + - 255 + sessions_id: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 1 + name: sessions_id + order: 4 + size: + - 255 + users_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: users_id + order: 3 + size: + - 0 + indices: + - fields: + - sessions_id + name: carts_idx_sessions_id + options: [] + type: NORMAL + - fields: + - users_id + name: carts_idx_users_id + options: [] + type: NORMAL + name: carts + options: [] + order: 5 + conference_attendees: + constraints: + - deferrable: 1 + expression: '' + fields: + - conferences_id + - users_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - conferences_id + match_type: '' + name: conference_attendees_fk_conferences_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - conferences_id + reference_table: conferences + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - users_id + match_type: '' + name: conference_attendees_fk_users_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - users_id + reference_table: users + type: FOREIGN KEY + fields: + conferences_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: conferences_id + order: 1 + size: + - 0 + confirmed: + data_type: boolean + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: confirmed + order: 3 + size: + - 0 + users_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: users_id + order: 2 + size: + - 0 + indices: + - fields: + - conferences_id + name: conference_attendees_idx_conferences_id + options: [] + type: NORMAL + - fields: + - users_id + name: conference_attendees_idx_users_id + options: [] + type: NORMAL + name: conference_attendees + options: [] + order: 49 + conference_tickets: + constraints: + - deferrable: 1 + expression: '' + fields: + - conferences_id + - sku + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - conferences_id + match_type: '' + name: conference_tickets_fk_conferences_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - conferences_id + reference_table: conferences + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - sku + match_type: '' + name: conference_tickets_fk_sku + on_delete: CASCADE + on_update: '' + options: [] + reference_fields: + - sku + reference_table: products + type: FOREIGN KEY + fields: + conferences_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: conferences_id + order: 1 + size: + - 0 + sku: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: sku + order: 2 + size: + - 64 + indices: + - fields: + - conferences_id + name: conference_tickets_idx_conferences_id + options: [] + type: NORMAL + - fields: + - sku + name: conference_tickets_idx_sku + options: [] + type: NORMAL + name: conference_tickets + options: [] + order: 45 + conferences: + constraints: + - deferrable: 1 + expression: '' + fields: + - conferences_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - name + match_type: '' + name: conferences_name + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + fields: + conferences_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: conferences_id + order: 1 + size: + - 0 + email: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: email + order: 5 + size: + - 255 + end_date: + data_type: date + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: end_date + order: 7 + size: + - 0 + logo: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: logo + order: 4 + size: + - 255 + name: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: name + order: 2 + size: + - 128 + start_date: + data_type: date + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: start_date + order: 6 + size: + - 0 + uri: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: uri + order: 3 + size: + - 255 + indices: [] + name: conferences + options: [] + order: 6 + countries: + constraints: + - deferrable: 1 + expression: '' + fields: + - country_iso_code + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + fields: + active: + data_type: boolean + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: active + order: 6 + size: + - 0 + country_iso_code: + data_type: char + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: country_iso_code + order: 1 + size: + - 2 + name: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: name + order: 3 + size: + - 255 + priority: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: priority + order: 4 + size: + - 0 + scope: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: scope + order: 2 + size: + - 32 + show_states: + data_type: boolean + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: show_states + order: 5 + size: + - 0 + indices: [] + name: countries + options: [] + order: 7 + events: + constraints: + - deferrable: 1 + expression: '' + fields: + - events_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - conferences_id + match_type: '' + name: events_fk_conferences_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - conferences_id + reference_table: conferences + type: FOREIGN KEY + fields: + abstract: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: abstract + order: 5 + size: + - 2048 + conferences_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: conferences_id + order: 2 + size: + - 0 + duration: + data_type: smallint + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: duration + order: 3 + size: + - 0 + events_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: events_id + order: 1 + size: + - 0 + room: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: room + order: 9 + size: + - 128 + scheduled: + data_type: boolean + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: scheduled + order: 7 + size: + - 0 + start_time: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: start_time + order: 8 + size: + - 0 + title: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: title + order: 4 + size: + - 255 + url: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: url + order: 6 + size: + - 255 + indices: + - fields: + - conferences_id + name: events_idx_conferences_id + options: [] + type: NORMAL + name: events + options: [] + order: 41 + inventories: + constraints: + - deferrable: 1 + expression: '' + fields: + - sku + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - sku + match_type: '' + name: inventories_fk_sku + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - sku + reference_table: products + type: FOREIGN KEY + fields: + quantity: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: quantity + order: 2 + size: + - 0 + sku: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: sku + order: 1 + size: + - 64 + indices: [] + name: inventories + options: [] + order: 8 + media_displays: + constraints: + - deferrable: 1 + expression: '' + fields: + - media_displays_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - media_types_id + - type + match_type: '' + name: media_types_id_type_unique + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - media_types_id + match_type: '' + name: media_displays_fk_media_types_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - media_types_id + reference_table: media_types + type: FOREIGN KEY + fields: + media_displays_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: media_displays_id + order: 1 + size: + - 0 + media_types_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: media_types_id + order: 2 + size: + - 0 + name: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: name + order: 4 + size: + - 255 + path: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: path + order: 5 + size: + - 255 + size: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: size + order: 6 + size: + - 255 + type: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: type + order: 3 + size: + - 255 + indices: + - fields: + - media_types_id + name: media_displays_idx_media_types_id + options: [] + type: NORMAL + name: media_displays + options: [] + order: 9 + media_messages: + constraints: + - deferrable: 1 + expression: '' + fields: + - media_id + - messages_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - media_id + match_type: '' + name: media_messages_fk_media_id + on_delete: '' + on_update: '' + options: [] + reference_fields: + - media_id + reference_table: medias + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - messages_id + match_type: '' + name: media_messages_fk_messages_id + on_delete: '' + on_update: '' + options: [] + reference_fields: + - messages_id + reference_table: messages + type: FOREIGN KEY + fields: + media_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: media_id + order: 1 + size: + - 0 + messages_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: messages_id + order: 2 + size: + - 0 + indices: + - fields: + - media_id + name: media_messages_idx_media_id + options: [] + type: NORMAL + - fields: + - messages_id + name: media_messages_idx_messages_id + options: [] + type: NORMAL + name: media_messages + options: [] + order: 58 + media_navigations: + constraints: + - deferrable: 1 + expression: '' + fields: + - media_id + - navigation_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - media_id + match_type: '' + name: media_navigations_fk_media_id + on_delete: '' + on_update: '' + options: [] + reference_fields: + - media_id + reference_table: medias + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - navigation_id + match_type: '' + name: media_navigations_fk_navigation_id + on_delete: '' + on_update: '' + options: [] + reference_fields: + - navigation_id + reference_table: navigations + type: FOREIGN KEY + fields: + media_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: media_id + order: 1 + size: + - 0 + navigation_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: navigation_id + order: 2 + size: + - 0 + indices: + - fields: + - media_id + name: media_navigations_idx_media_id + options: [] + type: NORMAL + - fields: + - navigation_id + name: media_navigations_idx_navigation_id + options: [] + type: NORMAL + name: media_navigations + options: [] + order: 53 + media_products: + constraints: + - deferrable: 1 + expression: '' + fields: + - media_id + - sku + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - media_id + match_type: '' + name: media_products_fk_media_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - media_id + reference_table: medias + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - sku + match_type: '' + name: media_products_fk_sku + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - sku + reference_table: products + type: FOREIGN KEY + fields: + media_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: media_id + order: 1 + size: + - 0 + sku: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: sku + order: 2 + size: + - 64 + indices: + - fields: + - media_id + name: media_products_idx_media_id + options: [] + type: NORMAL + - fields: + - sku + name: media_products_idx_sku + options: [] + type: NORMAL + name: media_products + options: [] + order: 10 + media_types: + constraints: + - deferrable: 1 + expression: '' + fields: + - media_types_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - type + match_type: '' + name: media_types_type + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + fields: + media_types_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: media_types_id + order: 1 + size: + - 0 + type: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: type + order: 2 + size: + - 32 + indices: [] + name: media_types + options: [] + order: 11 + medias: + constraints: + - deferrable: 1 + expression: '' + fields: + - media_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - media_id + - media_types_id + match_type: '' + name: media_id_media_types_id_unique + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - file + match_type: '' + name: medias_file + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - author_users_id + match_type: '' + name: medias_fk_author_users_id + on_delete: '' + on_update: '' + options: [] + reference_fields: + - users_id + reference_table: users + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - media_types_id + match_type: '' + name: medias_fk_media_types_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - media_types_id + reference_table: media_types + type: FOREIGN KEY + fields: + active: + data_type: boolean + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: active + order: 9 + size: + - 0 + author_users_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: author_users_id + order: 6 + size: + - 0 + created: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: created + order: 7 + size: + - 0 + file: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 1 + name: file + order: 2 + size: + - 255 + label: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: label + order: 5 + size: + - 255 + last_modified: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: last_modified + order: 8 + size: + - 0 + media_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 1 + name: media_id + order: 1 + size: + - 0 + media_types_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: media_types_id + order: 10 + size: + - 0 + mime_type: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: mime_type + order: 4 + size: + - 255 + priority: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: priority + order: 11 + size: + - 0 + uri: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: uri + order: 3 + size: + - 255 + indices: + - fields: + - author_users_id + name: medias_idx_author_users_id + options: [] + type: NORMAL + - fields: + - media_types_id + name: medias_idx_media_types_id + options: [] + type: NORMAL + name: medias + options: [] + order: 46 + merchandising_attributes: + constraints: + - deferrable: 1 + expression: '' + fields: + - merchandising_attributes_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - merchandising_products_id + match_type: '' + name: merchandising_attributes_fk_merchandising_products_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - merchandising_products_id + reference_table: merchandising_products + type: FOREIGN KEY + fields: + merchandising_attributes_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: merchandising_attributes_id + order: 1 + size: + - 0 + merchandising_products_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: merchandising_products_id + order: 2 + size: + - 0 + name: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: name + order: 3 + size: + - 32 + value: + data_type: text + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: value + order: 4 + size: + - 0 + indices: + - fields: + - merchandising_products_id + name: merchandising_attributes_idx_merchandising_products_id + options: [] + type: NORMAL + name: merchandising_attributes + options: [] + order: 12 + merchandising_products: + constraints: + - deferrable: 1 + expression: '' + fields: + - merchandising_products_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - sku + - sku_related + - type + match_type: '' + name: merchandising_products_sku_sku_related_type + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - sku + match_type: '' + name: merchandising_products_fk_sku + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - sku + reference_table: products + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - sku_related + match_type: '' + name: merchandising_products_fk_sku_related + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - sku + reference_table: products + type: FOREIGN KEY + fields: + merchandising_products_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: merchandising_products_id + order: 1 + size: + - 0 + sku: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: sku + order: 2 + size: + - 64 + sku_related: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 1 + name: sku_related + order: 3 + size: + - 64 + type: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: type + order: 4 + size: + - 32 + indices: + - fields: + - sku + name: merchandising_products_idx_sku + options: [] + type: NORMAL + - fields: + - sku_related + name: merchandising_products_idx_sku_related + options: [] + type: NORMAL + name: merchandising_products + options: [] + order: 13 + message_types: + constraints: + - deferrable: 1 + expression: '' + fields: + - message_types_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - name + match_type: '' + name: message_types_name + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + fields: + active: + data_type: boolean + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: active + order: 3 + size: + - 0 + message_types_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: message_types_id + order: 1 + size: + - 0 + name: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: name + order: 2 + size: + - 255 + indices: [] + name: message_types + options: [] + order: 14 + messages: + constraints: + - deferrable: 1 + expression: '' + fields: + - messages_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - uri + match_type: '' + name: messages_uri + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - parent_id + match_type: '' + name: messages_fk_parent_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - messages_id + reference_table: messages + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - approved_by_users_id + match_type: '' + name: messages_fk_approved_by_users_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - users_id + reference_table: users + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - author_users_id + match_type: '' + name: messages_fk_author_users_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - users_id + reference_table: users + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - message_types_id + match_type: '' + name: messages_fk_message_types_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - message_types_id + reference_table: message_types + type: FOREIGN KEY + fields: + approved: + data_type: boolean + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: approved + order: 12 + size: + - 0 + approved_by_users_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: approved_by_users_id + order: 13 + size: + - 0 + author_users_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: author_users_id + order: 8 + size: + - 0 + content: + data_type: text + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: content + order: 6 + size: + - 0 + created: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: created + order: 15 + size: + - 0 + format: + data_type: varchar + default_value: plain + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: format + order: 5 + size: + - 32 + last_modified: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: last_modified + order: 16 + size: + - 0 + message_types_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: message_types_id + order: 3 + size: + - 0 + messages_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: messages_id + order: 1 + size: + - 0 + parent_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: parent_id + order: 14 + size: + - 0 + public: + data_type: boolean + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: public + order: 11 + size: + - 0 + rating: + data_type: numeric + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: rating + order: 9 + size: + - 4 + - 2 + recommend: + data_type: boolean + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: recommend + order: 10 + size: + - 0 + summary: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: summary + order: 7 + size: + - 1024 + tags: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: tags + order: 17 + size: + - 256 + title: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: title + order: 2 + size: + - 255 + uri: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 1 + name: uri + order: 4 + size: + - 255 + indices: + - fields: + - parent_id + name: messages_idx_parent_id + options: [] + type: NORMAL + - fields: + - approved_by_users_id + name: messages_idx_approved_by_users_id + options: [] + type: NORMAL + - fields: + - author_users_id + name: messages_idx_author_users_id + options: [] + type: NORMAL + - fields: + - message_types_id + name: messages_idx_message_types_id + options: [] + type: NORMAL + name: messages + options: [] + order: 50 + navigation_attribute_values: + constraints: + - deferrable: 1 + expression: '' + fields: + - navigation_attribute_values_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - attribute_values_id + match_type: '' + name: navigation_attribute_values_fk_attribute_values_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - attribute_values_id + reference_table: attribute_values + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - navigation_attributes_id + match_type: '' + name: navigation_attribute_values_fk_navigation_attributes_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - navigation_attributes_id + reference_table: navigation_attributes + type: FOREIGN KEY + fields: + attribute_values_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: attribute_values_id + order: 3 + size: + - 0 + navigation_attribute_values_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: navigation_attribute_values_id + order: 1 + size: + - 0 + navigation_attributes_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: navigation_attributes_id + order: 2 + size: + - 0 + indices: + - fields: + - attribute_values_id + name: navigation_attribute_values_idx_attribute_values_id + options: [] + type: NORMAL + - fields: + - navigation_attributes_id + name: navigation_attribute_values_idx_navigation_attributes_id + options: [] + type: NORMAL + name: navigation_attribute_values + options: [] + order: 15 + navigation_attributes: + constraints: + - deferrable: 1 + expression: '' + fields: + - navigation_attributes_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - navigation_id + - attributes_id + match_type: '' + name: navigation_id_attributes_id + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - attributes_id + match_type: '' + name: navigation_attributes_fk_attributes_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - attributes_id + reference_table: attributes + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - navigation_id + match_type: '' + name: navigation_attributes_fk_navigation_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - navigation_id + reference_table: navigations + type: FOREIGN KEY + fields: + attributes_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: attributes_id + order: 3 + size: + - 0 + navigation_attributes_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: navigation_attributes_id + order: 1 + size: + - 0 + navigation_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: navigation_id + order: 2 + size: + - 0 + indices: + - fields: + - attributes_id + name: navigation_attributes_idx_attributes_id + options: [] + type: NORMAL + - fields: + - navigation_id + name: navigation_attributes_idx_navigation_id + options: [] + type: NORMAL + name: navigation_attributes + options: [] + order: 16 + navigation_messages: + constraints: + - deferrable: 1 + expression: '' + fields: + - messages_id + - navigation_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - messages_id + match_type: '' + name: navigation_messages_fk_messages_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - messages_id + reference_table: messages + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - navigation_id + match_type: '' + name: navigation_messages_fk_navigation_id + on_delete: CASCADE + on_update: '' + options: [] + reference_fields: + - navigation_id + reference_table: navigations + type: FOREIGN KEY + fields: + messages_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: messages_id + order: 1 + size: + - 0 + navigation_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: navigation_id + order: 2 + size: + - 0 + indices: + - fields: + - messages_id + name: navigation_messages_idx_messages_id + options: [] + type: NORMAL + - fields: + - navigation_id + name: navigation_messages_idx_navigation_id + options: [] + type: NORMAL + name: navigation_messages + options: [] + order: 59 + navigation_products: + constraints: + - deferrable: 1 + expression: '' + fields: + - sku + - navigation_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - navigation_id + match_type: '' + name: navigation_products_fk_navigation_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - navigation_id + reference_table: navigations + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - sku + match_type: '' + name: navigation_products_fk_sku + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - sku + reference_table: products + type: FOREIGN KEY + fields: + navigation_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: navigation_id + order: 2 + size: + - 0 + priority: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: priority + order: 4 + size: + - 0 + sku: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: sku + order: 1 + size: + - 64 + type: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: type + order: 3 + size: + - 16 + indices: + - fields: + - navigation_id + name: navigation_products_idx_navigation_id + options: [] + type: NORMAL + - fields: + - sku + name: navigation_products_idx_sku + options: [] + type: NORMAL + name: navigation_products + options: [] + order: 17 + navigations: + constraints: + - deferrable: 1 + expression: '' + fields: + - navigation_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - uri + match_type: '' + name: navigations_uri + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - parent_id + match_type: '' + name: navigations_fk_parent_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - navigation_id + reference_table: navigations + type: FOREIGN KEY + fields: + active: + data_type: boolean + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: active + order: 13 + size: + - 0 + alias: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: alias + order: 7 + size: + - 0 + created: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: created + order: 11 + size: + - 0 + description: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: description + order: 6 + size: + - 1024 + last_modified: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: last_modified + order: 12 + size: + - 0 + name: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: name + order: 5 + size: + - 255 + navigation_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: navigation_id + order: 1 + size: + - 0 + parent_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: parent_id + order: 8 + size: + - 0 + priority: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: priority + order: 9 + size: + - 0 + product_count: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: product_count + order: 10 + size: + - 0 + scope: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: scope + order: 4 + size: + - 32 + type: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: type + order: 3 + size: + - 32 + uri: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 1 + name: uri + order: 2 + size: + - 255 + indices: + - fields: + - parent_id + name: navigations_idx_parent_id + options: [] + type: NORMAL + name: navigations + options: [] + order: 18 + order_comments: + constraints: + - deferrable: 1 + expression: '' + fields: + - messages_id + - orders_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - messages_id + match_type: '' + name: order_comments_fk_messages_id + on_delete: CASCADE + on_update: '' + options: [] + reference_fields: + - messages_id + reference_table: messages + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - orders_id + match_type: '' + name: order_comments_fk_orders_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - orders_id + reference_table: orders + type: FOREIGN KEY + fields: + messages_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: messages_id + order: 1 + size: + - 0 + orders_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: orders_id + order: 2 + size: + - 0 + indices: + - fields: + - messages_id + name: order_comments_idx_messages_id + options: [] + type: NORMAL + - fields: + - orders_id + name: order_comments_idx_orders_id + options: [] + type: NORMAL + name: order_comments + options: [] + order: 63 + order_statuses: + constraints: + - deferrable: 1 + expression: '' + fields: + - order_status_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - orders_id + match_type: '' + name: order_statuses_fk_orders_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - orders_id + reference_table: orders + type: FOREIGN KEY + fields: + created: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: created + order: 4 + size: + - 0 + order_status_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: order_status_id + order: 1 + size: + - 0 + orders_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: orders_id + order: 2 + size: + - 0 + status: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: status + order: 3 + size: + - 32 + indices: + - fields: + - orders_id + name: order_statuses_idx_orders_id + options: [] + type: NORMAL + name: order_statuses + options: [] + order: 47 + orderlines: + constraints: + - deferrable: 1 + expression: '' + fields: + - orderlines_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - orders_id + match_type: '' + name: orderlines_fk_orders_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - orders_id + reference_table: orders + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - sku + match_type: '' + name: orderlines_fk_sku + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - sku + reference_table: products + type: FOREIGN KEY + fields: + description: + data_type: text + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: description + order: 7 + size: + - 0 + handling: + data_type: numeric + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: handling + order: 13 + size: + - 21 + - 3 + name: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: name + order: 5 + size: + - 255 + order_position: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: order_position + order: 3 + size: + - 0 + orderlines_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: orderlines_id + order: 1 + size: + - 0 + orders_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: orders_id + order: 2 + size: + - 0 + price: + data_type: numeric + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: price + order: 10 + size: + - 21 + - 3 + quantity: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: quantity + order: 9 + size: + - 0 + salestax: + data_type: numeric + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: salestax + order: 14 + size: + - 21 + - 3 + shipping: + data_type: numeric + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: shipping + order: 12 + size: + - 21 + - 3 + short_description: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: short_description + order: 6 + size: + - 500 + sku: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: sku + order: 4 + size: + - 64 + status: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: status + order: 15 + size: + - 24 + subtotal: + data_type: numeric + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: subtotal + order: 11 + size: + - 21 + - 3 + weight: + data_type: numeric + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: weight + order: 8 + size: + - 10 + - 3 + indices: + - fields: + - orders_id + name: orderlines_idx_orders_id + options: [] + type: NORMAL + - fields: + - sku + name: orderlines_idx_sku + options: [] + type: NORMAL + name: orderlines + options: [] + order: 19 + orderlines_shippings: + constraints: + - deferrable: 1 + expression: '' + fields: + - orderlines_id + - addresses_id + - shipments_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - addresses_id + match_type: '' + name: orderlines_shippings_fk_addresses_id + on_delete: '' + on_update: '' + options: [] + reference_fields: + - addresses_id + reference_table: addresses + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - orderlines_id + match_type: '' + name: orderlines_shippings_fk_orderlines_id + on_delete: '' + on_update: '' + options: [] + reference_fields: + - orderlines_id + reference_table: orderlines + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - shipments_id + match_type: '' + name: orderlines_shippings_fk_shipments_id + on_delete: '' + on_update: '' + options: [] + reference_fields: + - shipments_id + reference_table: shipments + type: FOREIGN KEY + fields: + addresses_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: addresses_id + order: 2 + size: + - 0 + orderlines_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: orderlines_id + order: 1 + size: + - 0 + quantity: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: quantity + order: 4 + size: + - 0 + shipments_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: shipments_id + order: 3 + size: + - 0 + indices: + - fields: + - addresses_id + name: orderlines_shippings_idx_addresses_id + options: [] + type: NORMAL + - fields: + - orderlines_id + name: orderlines_shippings_idx_orderlines_id + options: [] + type: NORMAL + - fields: + - shipments_id + name: orderlines_shippings_idx_shipments_id + options: [] + type: NORMAL + name: orderlines_shippings + options: [] + order: 51 + orders: + constraints: + - deferrable: 1 + expression: '' + fields: + - orders_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - order_number + match_type: '' + name: orders_order_number + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - billing_addresses_id + match_type: '' + name: orders_fk_billing_addresses_id + on_delete: '' + on_update: '' + options: [] + reference_fields: + - addresses_id + reference_table: addresses + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - shipping_addresses_id + match_type: '' + name: orders_fk_shipping_addresses_id + on_delete: '' + on_update: '' + options: [] + reference_fields: + - addresses_id + reference_table: addresses + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - users_id + match_type: '' + name: orders_fk_users_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - users_id + reference_table: users + type: FOREIGN KEY + fields: + billing_addresses_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: billing_addresses_id + order: 7 + size: + - 0 + email: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: email + order: 5 + size: + - 255 + handling: + data_type: numeric + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: handling + order: 15 + size: + - 21 + - 3 + order_date: + data_type: timestamp + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: order_date + order: 3 + size: + - 0 + order_number: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: order_number + order: 2 + size: + - 24 + orders_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: orders_id + order: 1 + size: + - 0 + payment_method: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: payment_method + order: 9 + size: + - 255 + payment_number: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: payment_number + order: 10 + size: + - 255 + payment_status: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: payment_status + order: 11 + size: + - 255 + salestax: + data_type: numeric + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: salestax + order: 16 + size: + - 21 + - 3 + shipping: + data_type: numeric + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: shipping + order: 14 + size: + - 21 + - 3 + shipping_addresses_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: shipping_addresses_id + order: 6 + size: + - 0 + shipping_method: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: shipping_method + order: 12 + size: + - 255 + subtotal: + data_type: numeric + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: subtotal + order: 13 + size: + - 21 + - 3 + total_cost: + data_type: numeric + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: total_cost + order: 17 + size: + - 21 + - 3 + users_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: users_id + order: 4 + size: + - 0 + weight: + data_type: numeric + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: weight + order: 8 + size: + - 11 + - 3 + indices: + - fields: + - billing_addresses_id + name: orders_idx_billing_addresses_id + options: [] + type: NORMAL + - fields: + - shipping_addresses_id + name: orders_idx_shipping_addresses_id + options: [] + type: NORMAL + - fields: + - users_id + name: orders_idx_users_id + options: [] + type: NORMAL + name: orders + options: [] + order: 42 + payment_orders: + constraints: + - deferrable: 1 + expression: '' + fields: + - payment_orders_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - orders_id + match_type: '' + name: payment_orders_fk_orders_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - orders_id + reference_table: orders + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - sessions_id + match_type: '' + name: payment_orders_fk_sessions_id + on_delete: SET NULL + on_update: '' + options: [] + reference_fields: + - sessions_id + reference_table: sessions + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - users_id + match_type: '' + name: payment_orders_fk_users_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - users_id + reference_table: users + type: FOREIGN KEY + fields: + amount: + data_type: numeric + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: amount + order: 9 + size: + - 21 + - 3 + auth_code: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: auth_code + order: 5 + size: + - 255 + created: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: created + order: 15 + size: + - 0 + last_modified: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: last_modified + order: 16 + size: + - 0 + orders_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: orders_id + order: 8 + size: + - 0 + payment_action: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: payment_action + order: 3 + size: + - 32 + payment_error_code: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: payment_error_code + order: 12 + size: + - 32 + payment_error_message: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: payment_error_message + order: 13 + size: + - 0 + payment_fee: + data_type: numeric + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: payment_fee + order: 14 + size: + - 12 + - 3 + payment_id: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: payment_id + order: 4 + size: + - 32 + payment_mode: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: payment_mode + order: 2 + size: + - 32 + payment_orders_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: payment_orders_id + order: 1 + size: + - 0 + payment_sessions_id: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: payment_sessions_id + order: 11 + size: + - 255 + sessions_id: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: sessions_id + order: 7 + size: + - 255 + status: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: status + order: 10 + size: + - 32 + users_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: users_id + order: 6 + size: + - 0 + indices: + - fields: + - orders_id + name: payment_orders_idx_orders_id + options: [] + type: NORMAL + - fields: + - sessions_id + name: payment_orders_idx_sessions_id + options: [] + type: NORMAL + - fields: + - users_id + name: payment_orders_idx_users_id + options: [] + type: NORMAL + name: payment_orders + options: [] + order: 43 + permissions: + constraints: + - deferrable: 1 + expression: '' + fields: + - permissions_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - roles_id + match_type: '' + name: permissions_fk_roles_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - roles_id + reference_table: roles + type: FOREIGN KEY + fields: + perm: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: perm + order: 3 + size: + - 255 + permissions_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: permissions_id + order: 1 + size: + - 0 + roles_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: roles_id + order: 2 + size: + - 0 + indices: + - fields: + - roles_id + name: permissions_idx_roles_id + options: [] + type: NORMAL + name: permissions + options: [] + order: 20 + price_modifiers: + constraints: + - deferrable: 1 + expression: '' + fields: + - price_modifiers_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - sku + match_type: '' + name: price_modifiers_fk_sku + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - sku + reference_table: products + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - roles_id + match_type: '' + name: price_modifiers_fk_roles_id + on_delete: '' + on_update: '' + options: [] + reference_fields: + - roles_id + reference_table: roles + type: FOREIGN KEY + fields: + discount: + data_type: numeric + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: discount + order: 6 + size: + - 7 + - 4 + end_date: + data_type: date + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: end_date + order: 8 + size: + - 0 + price: + data_type: numeric + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: price + order: 5 + size: + - 21 + - 3 + price_modifiers_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: price_modifiers_id + order: 1 + size: + - 0 + quantity: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: quantity + order: 3 + size: + - 0 + roles_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: roles_id + order: 4 + size: + - 0 + sku: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: sku + order: 2 + size: + - 64 + start_date: + data_type: date + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: start_date + order: 7 + size: + - 0 + indices: + - fields: + - sku + name: price_modifiers_idx_sku + options: [] + type: NORMAL + - fields: + - roles_id + name: price_modifiers_idx_roles_id + options: [] + type: NORMAL + name: price_modifiers + options: [] + order: 21 + product_attribute_values: + constraints: + - deferrable: 1 + expression: '' + fields: + - product_attribute_values_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - attribute_values_id + match_type: '' + name: product_attribute_values_fk_attribute_values_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - attribute_values_id + reference_table: attribute_values + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - product_attributes_id + match_type: '' + name: product_attribute_values_fk_product_attributes_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - product_attributes_id + reference_table: product_attributes + type: FOREIGN KEY + fields: + attribute_values_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: attribute_values_id + order: 3 + size: + - 0 + product_attribute_values_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: product_attribute_values_id + order: 1 + size: + - 0 + product_attributes_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: product_attributes_id + order: 2 + size: + - 0 + indices: + - fields: + - attribute_values_id + name: product_attribute_values_idx_attribute_values_id + options: [] + type: NORMAL + - fields: + - product_attributes_id + name: product_attribute_values_idx_product_attributes_id + options: [] + type: NORMAL + name: product_attribute_values + options: [] + order: 22 + product_attributes: + constraints: + - deferrable: 1 + expression: '' + fields: + - product_attributes_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - sku + - attributes_id + match_type: '' + name: sku_attributes_id + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - attributes_id + match_type: '' + name: product_attributes_fk_attributes_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - attributes_id + reference_table: attributes + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - sku + match_type: '' + name: product_attributes_fk_sku + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - sku + reference_table: products + type: FOREIGN KEY + fields: + attributes_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: attributes_id + order: 3 + size: + - 0 + canonical: + data_type: boolean + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: canonical + order: 4 + size: + - 0 + product_attributes_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: product_attributes_id + order: 1 + size: + - 0 + sku: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: sku + order: 2 + size: + - 64 + indices: + - fields: + - attributes_id + name: product_attributes_idx_attributes_id + options: [] + type: NORMAL + - fields: + - sku + name: product_attributes_idx_sku + options: [] + type: NORMAL + name: product_attributes + options: [] + order: 23 + product_messages: + constraints: + - deferrable: 1 + expression: '' + fields: + - messages_id + - sku + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - messages_id + match_type: '' + name: product_messages_fk_messages_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - messages_id + reference_table: messages + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - sku + match_type: '' + name: product_messages_fk_sku + on_delete: CASCADE + on_update: '' + options: [] + reference_fields: + - sku + reference_table: products + type: FOREIGN KEY + fields: + messages_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: messages_id + order: 1 + size: + - 0 + sku: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: sku + order: 2 + size: + - 64 + indices: + - fields: + - messages_id + name: product_messages_idx_messages_id + options: [] + type: NORMAL + - fields: + - sku + name: product_messages_idx_sku + options: [] + type: NORMAL + name: product_messages + options: [] + order: 60 + product_reviews: + constraints: + - deferrable: 1 + expression: '' + fields: + - messages_id + - sku + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - messages_id + match_type: '' + name: product_reviews_fk_messages_id + on_delete: '' + on_update: '' + options: [] + reference_fields: + - messages_id + reference_table: messages + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - sku + match_type: '' + name: product_reviews_fk_sku + on_delete: '' + on_update: '' + options: [] + reference_fields: + - sku + reference_table: products + type: FOREIGN KEY + fields: + messages_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: messages_id + order: 1 + size: + - 0 + sku: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: sku + order: 2 + size: + - 64 + indices: + - fields: + - messages_id + name: product_reviews_idx_messages_id + options: [] + type: NORMAL + - fields: + - sku + name: product_reviews_idx_sku + options: [] + type: NORMAL + name: product_reviews + options: [] + order: 61 + products: + constraints: + - deferrable: 1 + expression: '' + fields: + - sku + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - gtin + match_type: '' + name: products_gtin + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - uri + match_type: '' + name: products_uri + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - canonical_sku + match_type: '' + name: products_fk_canonical_sku + on_delete: '' + on_update: '' + options: [] + reference_fields: + - sku + reference_table: products + type: FOREIGN KEY + fields: + active: + data_type: boolean + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: active + order: 12 + size: + - 0 + canonical_sku: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: canonical_sku + order: 11 + size: + - 64 + combine: + data_type: boolean + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: combine + order: 14 + size: + - 0 + created: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: created + order: 15 + size: + - 0 + description: + data_type: text + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: description + order: 5 + size: + - 0 + gtin: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 1 + name: gtin + order: 10 + size: + - 32 + inventory_exempt: + data_type: boolean + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: inventory_exempt + order: 13 + size: + - 0 + last_modified: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: last_modified + order: 16 + size: + - 0 + manufacturer_sku: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: manufacturer_sku + order: 2 + size: + - 64 + name: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: name + order: 3 + size: + - 255 + price: + data_type: numeric + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: price + order: 6 + size: + - 21 + - 3 + priority: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: priority + order: 9 + size: + - 0 + short_description: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: short_description + order: 4 + size: + - 500 + sku: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: sku + order: 1 + size: + - 64 + uri: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 1 + name: uri + order: 7 + size: + - 255 + weight: + data_type: numeric + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: weight + order: 8 + size: + - 10 + - 2 + indices: + - fields: + - canonical_sku + name: products_idx_canonical_sku + options: [] + type: NORMAL + name: products + options: [] + order: 24 + roles: + constraints: + - deferrable: 1 + expression: '' + fields: + - roles_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - name + match_type: '' + name: roles_name + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + fields: + description: + data_type: text + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: description + order: 4 + size: + - 0 + label: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: label + order: 3 + size: + - 255 + name: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: name + order: 2 + size: + - 32 + roles_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: roles_id + order: 1 + size: + - 0 + indices: [] + name: roles + options: [] + order: 25 + sessions: + constraints: + - deferrable: 1 + expression: '' + fields: + - sessions_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + fields: + created: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: created + order: 3 + size: + - 0 + last_modified: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: last_modified + order: 4 + size: + - 0 + session_data: + data_type: text + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: session_data + order: 2 + size: + - 0 + sessions_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: sessions_id + order: 1 + size: + - 255 + indices: [] + name: sessions + options: [] + order: 26 + settings: + constraints: + - deferrable: 1 + expression: '' + fields: + - settings_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + fields: + category: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: category + order: 6 + size: + - 32 + name: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: name + order: 4 + size: + - 32 + scope: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: scope + order: 2 + size: + - 32 + settings_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: settings_id + order: 1 + size: + - 0 + site: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: site + order: 3 + size: + - 32 + value: + data_type: text + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: value + order: 5 + size: + - 0 + indices: [] + name: settings + options: [] + order: 27 + shipment_carriers: + constraints: + - deferrable: 1 + expression: '' + fields: + - shipment_carriers_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + fields: + account_number: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: account_number + order: 4 + size: + - 255 + active: + data_type: boolean + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: active + order: 5 + size: + - 0 + name: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: name + order: 2 + size: + - 255 + shipment_carriers_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: shipment_carriers_id + order: 1 + size: + - 0 + title: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: title + order: 3 + size: + - 255 + indices: [] + name: shipment_carriers + options: [] + order: 28 + shipment_destinations: + constraints: + - deferrable: 1 + expression: '' + fields: + - shipment_destinations_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - shipment_methods_id + match_type: '' + name: shipment_destinations_fk_shipment_methods_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - shipment_methods_id + reference_table: shipment_methods + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - zones_id + match_type: '' + name: shipment_destinations_fk_zones_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - zones_id + reference_table: zones + type: FOREIGN KEY + fields: + active: + data_type: boolean + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: active + order: 4 + size: + - 0 + shipment_destinations_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: shipment_destinations_id + order: 1 + size: + - 0 + shipment_methods_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: shipment_methods_id + order: 3 + size: + - 0 + zones_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: zones_id + order: 2 + size: + - 0 + indices: + - fields: + - shipment_methods_id + name: shipment_destinations_idx_shipment_methods_id + options: [] + type: NORMAL + - fields: + - zones_id + name: shipment_destinations_idx_zones_id + options: [] + type: NORMAL + name: shipment_destinations + options: [] + order: 29 + shipment_methods: + constraints: + - deferrable: 1 + expression: '' + fields: + - shipment_methods_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - shipment_carriers_id + match_type: '' + name: shipment_methods_fk_shipment_carriers_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - shipment_carriers_id + reference_table: shipment_carriers + type: FOREIGN KEY + fields: + active: + data_type: boolean + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: active + order: 5 + size: + - 0 + created: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: created + order: 6 + size: + - 0 + last_modified: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: last_modified + order: 7 + size: + - 0 + name: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: name + order: 2 + size: + - 255 + shipment_carriers_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: shipment_carriers_id + order: 4 + size: + - 0 + shipment_methods_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: shipment_methods_id + order: 1 + size: + - 0 + title: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: title + order: 3 + size: + - 255 + indices: + - fields: + - shipment_carriers_id + name: shipment_methods_idx_shipment_carriers_id + options: [] + type: NORMAL + name: shipment_methods + options: [] + order: 30 + shipment_rates: + constraints: + - deferrable: 1 + expression: '' + fields: + - shipment_rates_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - shipment_methods_id + match_type: '' + name: shipment_rates_fk_shipment_methods_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - shipment_methods_id + reference_table: shipment_methods + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - zones_id + match_type: '' + name: shipment_rates_fk_zones_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - zones_id + reference_table: zones + type: FOREIGN KEY + fields: + created: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: created + order: 11 + size: + - 0 + last_modified: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: last_modified + order: 12 + size: + - 0 + max_value: + data_type: numeric + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: max_value + order: 7 + size: + - 10 + - 2 + min_value: + data_type: numeric + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: min_value + order: 6 + size: + - 10 + - 2 + price: + data_type: numeric + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: price + order: 8 + size: + - 21 + - 3 + shipment_methods_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: shipment_methods_id + order: 3 + size: + - 0 + shipment_rates_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: shipment_rates_id + order: 1 + size: + - 0 + valid_from: + data_type: date + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: valid_from + order: 9 + size: + - 0 + valid_to: + data_type: date + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: valid_to + order: 10 + size: + - 0 + value_type: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: value_type + order: 4 + size: + - 64 + value_unit: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: value_unit + order: 5 + size: + - 64 + zones_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: zones_id + order: 2 + size: + - 0 + indices: + - fields: + - shipment_methods_id + name: shipment_rates_idx_shipment_methods_id + options: [] + type: NORMAL + - fields: + - zones_id + name: shipment_rates_idx_zones_id + options: [] + type: NORMAL + name: shipment_rates + options: [] + order: 31 + shipments: + constraints: + - deferrable: 1 + expression: '' + fields: + - shipments_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - shipment_carriers_id + match_type: '' + name: shipments_fk_shipment_carriers_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - shipment_carriers_id + reference_table: shipment_carriers + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - shipment_methods_id + match_type: '' + name: shipments_fk_shipment_methods_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - shipment_methods_id + reference_table: shipment_methods + type: FOREIGN KEY + fields: + created: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: created + order: 5 + size: + - 0 + last_modified: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: last_modified + order: 6 + size: + - 0 + shipment_carriers_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: shipment_carriers_id + order: 3 + size: + - 0 + shipment_methods_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: shipment_methods_id + order: 4 + size: + - 0 + shipments_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: shipments_id + order: 1 + size: + - 0 + tracking_number: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: tracking_number + order: 2 + size: + - 255 + indices: + - fields: + - shipment_carriers_id + name: shipments_idx_shipment_carriers_id + options: [] + type: NORMAL + - fields: + - shipment_methods_id + name: shipments_idx_shipment_methods_id + options: [] + type: NORMAL + name: shipments + options: [] + order: 32 + states: + constraints: + - deferrable: 1 + expression: '' + fields: + - states_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - country_iso_code + - state_iso_code + match_type: '' + name: states_state_country + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - country_iso_code + match_type: '' + name: states_fk_country_iso_code + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - country_iso_code + reference_table: countries + type: FOREIGN KEY + fields: + active: + data_type: boolean + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: active + order: 7 + size: + - 0 + country_iso_code: + data_type: char + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: country_iso_code + order: 3 + size: + - 2 + name: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: name + order: 5 + size: + - 255 + priority: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: priority + order: 6 + size: + - 0 + scope: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: scope + order: 2 + size: + - 32 + state_iso_code: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: state_iso_code + order: 4 + size: + - 6 + states_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: states_id + order: 1 + size: + - 0 + indices: + - fields: + - country_iso_code + name: states_idx_country_iso_code + options: [] + type: NORMAL + name: states + options: [] + order: 33 + survey_question_options: + constraints: + - deferrable: 1 + expression: '' + fields: + - survey_question_option_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - survey_question_id + match_type: '' + name: survey_question_options_fk_survey_question_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - survey_question_id + reference_table: survey_questions + type: FOREIGN KEY + fields: + priority: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: priority + order: 3 + size: + - 0 + survey_question_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: survey_question_id + order: 4 + size: + - 0 + survey_question_option_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: survey_question_option_id + order: 1 + size: + - 0 + title: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: title + order: 2 + size: + - 255 + indices: + - fields: + - survey_question_id + name: survey_question_options_idx_survey_question_id + options: [] + type: NORMAL + name: survey_question_options + options: [] + order: 64 + survey_questions: + constraints: + - deferrable: 1 + expression: '' + fields: + - survey_question_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - survey_section_id + match_type: '' + name: survey_questions_fk_survey_section_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - survey_section_id + reference_table: survey_sections + type: FOREIGN KEY + fields: + description: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: description + order: 3 + size: + - 2048 + other: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: other + order: 4 + size: + - 255 + priority: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: priority + order: 6 + size: + - 0 + survey_question_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: survey_question_id + order: 1 + size: + - 0 + survey_section_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: survey_section_id + order: 7 + size: + - 0 + title: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: title + order: 2 + size: + - 255 + type: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: type + order: 5 + size: + - 16 + indices: + - fields: + - survey_section_id + name: survey_questions_idx_survey_section_id + options: [] + type: NORMAL + name: survey_questions + options: [] + order: 62 + survey_response_options: + constraints: + - deferrable: 1 + expression: '' + fields: + - survey_response_option_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - survey_question_option_id + match_type: '' + name: survey_response_options_fk_survey_question_option_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - survey_question_option_id + reference_table: survey_question_options + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - survey_response_id + match_type: '' + name: survey_response_options_fk_survey_response_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - survey_response_id + reference_table: survey_responses + type: FOREIGN KEY + fields: + survey_question_option_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: survey_question_option_id + order: 3 + size: + - 0 + survey_response_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: survey_response_id + order: 2 + size: + - 0 + survey_response_option_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: survey_response_option_id + order: 1 + size: + - 0 + value: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: value + order: 4 + size: + - 0 + indices: + - fields: + - survey_question_option_id + name: survey_response_options_idx_survey_question_option_id + options: [] + type: NORMAL + - fields: + - survey_response_id + name: survey_response_options_idx_survey_response_id + options: [] + type: NORMAL + name: survey_response_options + options: [] + order: 66 + survey_responses: + constraints: + - deferrable: 1 + expression: '' + fields: + - survey_response_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - user_survey_id + - survey_question_id + match_type: '' + name: user_survey_survey_question + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - survey_question_id + match_type: '' + name: survey_responses_fk_survey_question_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - survey_question_id + reference_table: survey_questions + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - user_survey_id + match_type: '' + name: survey_responses_fk_user_survey_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - user_survey_id + reference_table: user_surveys + type: FOREIGN KEY + fields: + other: + data_type: text + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: other + order: 4 + size: + - 0 + survey_question_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: survey_question_id + order: 3 + size: + - 0 + survey_response_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: survey_response_id + order: 1 + size: + - 0 + user_survey_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: user_survey_id + order: 2 + size: + - 0 + indices: + - fields: + - survey_question_id + name: survey_responses_idx_survey_question_id + options: [] + type: NORMAL + - fields: + - user_survey_id + name: survey_responses_idx_user_survey_id + options: [] + type: NORMAL + name: survey_responses + options: [] + order: 65 + survey_sections: + constraints: + - deferrable: 1 + expression: '' + fields: + - survey_section_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - survey_id + match_type: '' + name: survey_sections_fk_survey_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - survey_id + reference_table: surveys + type: FOREIGN KEY + fields: + description: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: description + order: 3 + size: + - 2048 + priority: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: priority + order: 4 + size: + - 0 + survey_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: survey_id + order: 5 + size: + - 0 + survey_section_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: survey_section_id + order: 1 + size: + - 0 + title: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: title + order: 2 + size: + - 255 + indices: + - fields: + - survey_id + name: survey_sections_idx_survey_id + options: [] + type: NORMAL + name: survey_sections + options: [] + order: 54 + surveys: + constraints: + - deferrable: 1 + expression: '' + fields: + - survey_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - conferences_id + - title + match_type: '' + name: surveys_conferences_id_title + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - author_id + match_type: '' + name: surveys_fk_author_id + on_delete: '' + on_update: '' + options: [] + reference_fields: + - users_id + reference_table: users + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - conferences_id + match_type: '' + name: surveys_fk_conferences_id + on_delete: '' + on_update: '' + options: [] + reference_fields: + - conferences_id + reference_table: conferences + type: FOREIGN KEY + fields: + author_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: author_id + order: 4 + size: + - 0 + closed: + data_type: boolean + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: closed + order: 6 + size: + - 0 + conferences_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: conferences_id + order: 3 + size: + - 0 + created: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: created + order: 7 + size: + - 0 + last_modified: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: last_modified + order: 8 + size: + - 0 + priority: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: priority + order: 9 + size: + - 0 + public: + data_type: boolean + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: public + order: 5 + size: + - 0 + survey_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: survey_id + order: 1 + size: + - 0 + title: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: title + order: 2 + size: + - 255 + indices: + - fields: + - author_id + name: surveys_idx_author_id + options: [] + type: NORMAL + - fields: + - conferences_id + name: surveys_idx_conferences_id + options: [] + type: NORMAL + name: surveys + options: [] + order: 52 + talks: + constraints: + - deferrable: 1 + expression: '' + fields: + - talks_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - author_id + match_type: '' + name: talks_fk_author_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - users_id + reference_table: users + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - conferences_id + match_type: '' + name: talks_fk_conferences_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - conferences_id + reference_table: conferences + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - survey_id + match_type: '' + name: talks_fk_survey_id + on_delete: SET NULL + on_update: '' + options: [] + reference_fields: + - survey_id + reference_table: surveys + type: FOREIGN KEY + fields: + abstract: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: abstract + order: 7 + size: + - 2048 + accepted: + data_type: boolean + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: accepted + order: 11 + size: + - 0 + author_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: author_id + order: 2 + size: + - 0 + comments: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: comments + order: 10 + size: + - 1024 + conferences_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: conferences_id + order: 3 + size: + - 0 + confirmed: + data_type: boolean + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: confirmed + order: 12 + size: + - 0 + duration: + data_type: smallint + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: duration + order: 4 + size: + - 0 + lightning: + data_type: boolean + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: lightning + order: 13 + size: + - 0 + room: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: room + order: 16 + size: + - 128 + scheduled: + data_type: boolean + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: scheduled + order: 14 + size: + - 0 + start_time: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: start_time + order: 15 + size: + - 0 + survey_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: survey_id + order: 17 + size: + - 0 + tags: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: tags + order: 6 + size: + - 255 + talks_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: talks_id + order: 1 + size: + - 0 + title: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: title + order: 5 + size: + - 255 + url: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: url + order: 8 + size: + - 255 + video_url: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: video_url + order: 9 + size: + - 255 + indices: + - fields: + - author_id + name: talks_idx_author_id + options: [] + type: NORMAL + - fields: + - conferences_id + name: talks_idx_conferences_id + options: [] + type: NORMAL + - fields: + - survey_id + name: talks_idx_survey_id + options: [] + type: NORMAL + name: talks + options: [] + order: 55 + taxes: + constraints: + - deferrable: 1 + expression: '' + fields: + - taxes_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - country_iso_code + match_type: '' + name: taxes_fk_country_iso_code + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - country_iso_code + reference_table: countries + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - states_id + match_type: '' + name: taxes_fk_states_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - states_id + reference_table: states + type: FOREIGN KEY + fields: + country_iso_code: + data_type: char + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: country_iso_code + order: 9 + size: + - 2 + created: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: created + order: 11 + size: + - 0 + decimal_places: + data_type: integer + default_value: 2 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: decimal_places + order: 5 + size: + - 0 + description: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: description + order: 3 + size: + - 64 + last_modified: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: last_modified + order: 12 + size: + - 0 + percent: + data_type: numeric + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: percent + order: 4 + size: + - 7 + - 4 + rounding: + data_type: char + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: rounding + order: 6 + size: + - 1 + states_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: states_id + order: 10 + size: + - 0 + tax_name: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: tax_name + order: 2 + size: + - 64 + taxes_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: taxes_id + order: 1 + size: + - 0 + valid_from: + data_type: date + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: valid_from + order: 7 + size: + - 0 + valid_to: + data_type: date + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: valid_to + order: 8 + size: + - 0 + indices: + - fields: + - country_iso_code + name: taxes_idx_country_iso_code + options: [] + type: NORMAL + - fields: + - states_id + name: taxes_idx_states_id + options: [] + type: NORMAL + - fields: + - tax_name + name: taxes_idx_tax_name + options: [] + type: NORMAL + - fields: + - valid_from + name: taxes_idx_valid_from + options: [] + type: NORMAL + - fields: + - valid_to + name: taxes_idx_valid_to + options: [] + type: NORMAL + name: taxes + options: [] + order: 34 + uri_redirects: + constraints: + - deferrable: 1 + expression: '' + fields: + - uri_source + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + fields: + created: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: created + order: 4 + size: + - 0 + last_used: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: last_used + order: 5 + size: + - 0 + status_code: + data_type: integer + default_value: 301 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: status_code + order: 3 + size: + - 0 + uri_source: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: uri_source + order: 1 + size: + - 255 + uri_target: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: uri_target + order: 2 + size: + - 255 + indices: [] + name: uri_redirects + options: [] + order: 35 + user_attribute_values: + constraints: + - deferrable: 1 + expression: '' + fields: + - user_attribute_values_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - attribute_values_id + match_type: '' + name: user_attribute_values_fk_attribute_values_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - attribute_values_id + reference_table: attribute_values + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - user_attributes_id + match_type: '' + name: user_attribute_values_fk_user_attributes_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - user_attributes_id + reference_table: user_attributes + type: FOREIGN KEY + fields: + attribute_values_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: attribute_values_id + order: 3 + size: + - 0 + user_attribute_values_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: user_attribute_values_id + order: 1 + size: + - 0 + user_attributes_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: user_attributes_id + order: 2 + size: + - 0 + indices: + - fields: + - attribute_values_id + name: user_attribute_values_idx_attribute_values_id + options: [] + type: NORMAL + - fields: + - user_attributes_id + name: user_attribute_values_idx_user_attributes_id + options: [] + type: NORMAL + name: user_attribute_values + options: [] + order: 36 + user_attributes: + constraints: + - deferrable: 1 + expression: '' + fields: + - user_attributes_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - users_id + - attributes_id + match_type: '' + name: users_id_attributes_id + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - attributes_id + match_type: '' + name: user_attributes_fk_attributes_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - attributes_id + reference_table: attributes + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - users_id + match_type: '' + name: user_attributes_fk_users_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - users_id + reference_table: users + type: FOREIGN KEY + fields: + attributes_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: attributes_id + order: 3 + size: + - 0 + user_attributes_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: user_attributes_id + order: 1 + size: + - 0 + users_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: users_id + order: 2 + size: + - 0 + indices: + - fields: + - attributes_id + name: user_attributes_idx_attributes_id + options: [] + type: NORMAL + - fields: + - users_id + name: user_attributes_idx_users_id + options: [] + type: NORMAL + name: user_attributes + options: [] + order: 37 + user_roles: + constraints: + - deferrable: 1 + expression: '' + fields: + - users_id + - roles_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - roles_id + match_type: '' + name: user_roles_fk_roles_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - roles_id + reference_table: roles + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - users_id + match_type: '' + name: user_roles_fk_users_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - users_id + reference_table: users + type: FOREIGN KEY + fields: + roles_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: roles_id + order: 2 + size: + - 0 + users_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: users_id + order: 1 + size: + - 0 + indices: + - fields: + - roles_id + name: user_roles_idx_roles_id + options: [] + type: NORMAL + - fields: + - users_id + name: user_roles_idx_users_id + options: [] + type: NORMAL + name: user_roles + options: [] + order: 48 + user_surveys: + constraints: + - deferrable: 1 + expression: '' + fields: + - user_survey_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - users_id + - survey_id + match_type: '' + name: users_id_survey_id + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - survey_id + match_type: '' + name: user_surveys_fk_survey_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - survey_id + reference_table: surveys + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - users_id + match_type: '' + name: user_surveys_fk_users_id + on_delete: '' + on_update: '' + options: [] + reference_fields: + - users_id + reference_table: users + type: FOREIGN KEY + fields: + completed: + data_type: boolean + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: completed + order: 4 + size: + - 0 + survey_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: survey_id + order: 3 + size: + - 0 + user_survey_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: user_survey_id + order: 1 + size: + - 0 + users_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: users_id + order: 2 + size: + - 0 + indices: + - fields: + - survey_id + name: user_surveys_idx_survey_id + options: [] + type: NORMAL + - fields: + - users_id + name: user_surveys_idx_users_id + options: [] + type: NORMAL + name: user_surveys + options: [] + order: 56 + users: + constraints: + - deferrable: 1 + expression: '' + fields: + - users_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - nickname + match_type: '' + name: users_nickname + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - username + match_type: '' + name: users_username + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - media_id + match_type: '' + name: users_fk_media_id + on_delete: '' + on_update: '' + options: [] + reference_fields: + - media_id + reference_table: medias + type: FOREIGN KEY + fields: + active: + data_type: boolean + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: active + order: 15 + size: + - 0 + bio: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bio + order: 16 + size: + - 2048 + created: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: created + order: 13 + size: + - 0 + email: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: email + order: 4 + size: + - 255 + fail_count: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: fail_count + order: 9 + size: + - 0 + first_name: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: first_name + order: 6 + size: + - 255 + guru_level: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: guru_level + order: 20 + size: + - 0 + is_anonymous: + data_type: boolean + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: is_anonymous + order: 12 + size: + - 0 + last_login: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: last_login + order: 8 + size: + - 0 + last_modified: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: last_modified + order: 14 + size: + - 0 + last_name: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: last_name + order: 7 + size: + - 255 + media_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: media_id + order: 17 + size: + - 0 + monger_groups: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: monger_groups + order: 18 + size: + - 256 + nickname: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 1 + name: nickname + order: 3 + size: + - 255 + password: + data_type: varchar + default_value: '*' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: password + order: 5 + size: + - 2048 + pause_id: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: pause_id + order: 19 + size: + - 128 + reset_expires: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: reset_expires + order: 10 + size: + - 0 + reset_token: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: reset_token + order: 11 + size: + - 255 + t_shirt_size: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: t_shirt_size + order: 21 + size: + - 8 + username: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: username + order: 2 + size: + - 255 + users_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: users_id + order: 1 + size: + - 0 + indices: + - fields: + - media_id + name: users_idx_media_id + options: [] + type: NORMAL + - fields: + - reset_token + name: users_idx_reset_token + options: [] + type: NORMAL + name: users + options: [] + order: 44 + zone_countries: + constraints: + - deferrable: 1 + expression: '' + fields: + - zones_id + - country_iso_code + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - country_iso_code + match_type: '' + name: zone_countries_fk_country_iso_code + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - country_iso_code + reference_table: countries + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - zones_id + match_type: '' + name: zone_countries_fk_zones_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - zones_id + reference_table: zones + type: FOREIGN KEY + fields: + country_iso_code: + data_type: char + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: country_iso_code + order: 2 + size: + - 2 + zones_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: zones_id + order: 1 + size: + - 0 + indices: + - fields: + - country_iso_code + name: zone_countries_idx_country_iso_code + options: [] + type: NORMAL + - fields: + - zones_id + name: zone_countries_idx_zones_id + options: [] + type: NORMAL + name: zone_countries + options: [] + order: 38 + zone_states: + constraints: + - deferrable: 1 + expression: '' + fields: + - zones_id + - states_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - states_id + match_type: '' + name: zone_states_fk_states_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - states_id + reference_table: states + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - zones_id + match_type: '' + name: zone_states_fk_zones_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - zones_id + reference_table: zones + type: FOREIGN KEY + fields: + states_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: states_id + order: 2 + size: + - 0 + zones_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: zones_id + order: 1 + size: + - 0 + indices: + - fields: + - states_id + name: zone_states_idx_states_id + options: [] + type: NORMAL + - fields: + - zones_id + name: zone_states_idx_zones_id + options: [] + type: NORMAL + name: zone_states + options: [] + order: 39 + zones: + constraints: + - deferrable: 1 + expression: '' + fields: + - zones_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - zone + match_type: '' + name: zones_zone + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + fields: + created: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: created + order: 3 + size: + - 0 + last_modified: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: last_modified + order: 4 + size: + - 0 + zone: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: zone + order: 2 + size: + - 255 + zones_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: zones_id + order: 1 + size: + - 0 + indices: [] + name: zones + options: [] + order: 40 + triggers: {} + views: {} +translator: + add_drop_table: 0 + filename: ~ + no_comments: 0 + parser_args: + sources: + - Address + - AttendeeTalk + - Attribute + - AttributeValue + - Cart + - CartProduct + - Conference + - ConferenceAttendee + - ConferenceTicket + - Country + - Event + - Inventory + - Media + - MediaDisplay + - MediaMessage + - MediaNavigation + - MediaProduct + - MediaType + - MerchandisingAttribute + - MerchandisingProduct + - Message + - MessageType + - Navigation + - NavigationAttribute + - NavigationAttributeValue + - NavigationMessage + - NavigationProduct + - Order + - OrderComment + - OrderStatus + - Orderline + - OrderlinesShipping + - PaymentOrder + - Permission + - PriceModifier + - Product + - ProductAttribute + - ProductAttributeValue + - ProductMessage + - ProductReview + - Role + - Session + - Setting + - Shipment + - ShipmentCarrier + - ShipmentDestination + - ShipmentMethod + - ShipmentRate + - State + - Survey + - SurveyQuestion + - SurveyQuestionOption + - SurveyResponse + - SurveyResponseOption + - SurveySection + - Talk + - Tax + - UriRedirect + - User + - UserAttribute + - UserAttributeValue + - UserRole + - UserSurvey + - Zone + - ZoneCountry + - ZoneState + parser_type: SQL::Translator::Parser::DBIx::Class + producer_args: {} + producer_type: SQL::Translator::Producer::YAML + show_warnings: 0 + trace: 0 + version: 0.11018