/*
 Navicat Premium Data Transfer

 Source Server         : YFTEL-LOCAL
 Source Server Type    : PostgreSQL
 Source Server Version : 100010
 Source Host           : localhost:5432
 Source Catalog        : app2
 Source Schema         : public

 Target Server Type    : PostgreSQL
 Target Server Version : 100010
 File Encoding         : 65001

 Date: 30/03/2020 11:52:56
*/


-- ----------------------------
-- Sequence structure for account_types_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."account_types_id_seq";
CREATE SEQUENCE "public"."account_types_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER SEQUENCE "public"."account_types_id_seq" OWNER TO "postgres";

-- ----------------------------
-- Sequence structure for brands_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."brands_id_seq";
CREATE SEQUENCE "public"."brands_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER SEQUENCE "public"."brands_id_seq" OWNER TO "postgres";

-- ----------------------------
-- Sequence structure for campaigns_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."campaigns_id_seq";
CREATE SEQUENCE "public"."campaigns_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER SEQUENCE "public"."campaigns_id_seq" OWNER TO "postgres";

-- ----------------------------
-- Sequence structure for campaigns_to_plans_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."campaigns_to_plans_id_seq";
CREATE SEQUENCE "public"."campaigns_to_plans_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER SEQUENCE "public"."campaigns_to_plans_id_seq" OWNER TO "postgres";

-- ----------------------------
-- Sequence structure for combinations_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."combinations_id_seq";
CREATE SEQUENCE "public"."combinations_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER SEQUENCE "public"."combinations_id_seq" OWNER TO "postgres";

-- ----------------------------
-- Sequence structure for download_limits_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."download_limits_id_seq";
CREATE SEQUENCE "public"."download_limits_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER SEQUENCE "public"."download_limits_id_seq" OWNER TO "postgres";

-- ----------------------------
-- Sequence structure for filter_types_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."filter_types_id_seq";
CREATE SEQUENCE "public"."filter_types_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER SEQUENCE "public"."filter_types_id_seq" OWNER TO "postgres";

-- ----------------------------
-- Sequence structure for filters_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."filters_id_seq";
CREATE SEQUENCE "public"."filters_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER SEQUENCE "public"."filters_id_seq" OWNER TO "postgres";

-- ----------------------------
-- Sequence structure for menus_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."menus_id_seq";
CREATE SEQUENCE "public"."menus_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER SEQUENCE "public"."menus_id_seq" OWNER TO "postgres";

-- ----------------------------
-- Sequence structure for models_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."models_id_seq";
CREATE SEQUENCE "public"."models_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER SEQUENCE "public"."models_id_seq" OWNER TO "postgres";

-- ----------------------------
-- Sequence structure for plans_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."plans_id_seq";
CREATE SEQUENCE "public"."plans_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER SEQUENCE "public"."plans_id_seq" OWNER TO "postgres";

-- ----------------------------
-- Sequence structure for plans_to_filters_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."plans_to_filters_id_seq";
CREATE SEQUENCE "public"."plans_to_filters_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER SEQUENCE "public"."plans_to_filters_id_seq" OWNER TO "postgres";

-- ----------------------------
-- Sequence structure for profiles_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."profiles_id_seq";
CREATE SEQUENCE "public"."profiles_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER SEQUENCE "public"."profiles_id_seq" OWNER TO "postgres";

-- ----------------------------
-- Sequence structure for profiles_to_menus_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."profiles_to_menus_id_seq";
CREATE SEQUENCE "public"."profiles_to_menus_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER SEQUENCE "public"."profiles_to_menus_id_seq" OWNER TO "postgres";

-- ----------------------------
-- Sequence structure for speeds_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."speeds_id_seq";
CREATE SEQUENCE "public"."speeds_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER SEQUENCE "public"."speeds_id_seq" OWNER TO "postgres";

-- ----------------------------
-- Sequence structure for users_to_profiles_id_seq
-- ----------------------------
DROP SEQUENCE IF EXISTS "public"."users_to_profiles_id_seq";
CREATE SEQUENCE "public"."users_to_profiles_id_seq" 
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER SEQUENCE "public"."users_to_profiles_id_seq" OWNER TO "postgres";

-- ----------------------------
-- Table structure for account_types
-- ----------------------------
CREATE TABLE "public"."account_types" (
  "id" int8 NOT NULL DEFAULT nextval('account_types_id_seq'::regclass),
  "name" text COLLATE "pg_catalog"."default" NOT NULL,
  "is_active" varchar(1) COLLATE "pg_catalog"."default" NOT NULL
)
;
ALTER TABLE "public"."account_types" OWNER TO "postgres";

-- ----------------------------
-- Records of account_types
-- ----------------------------
BEGIN;
INSERT INTO "public"."account_types" VALUES (1, 'Pre - Pago', '1');
INSERT INTO "public"."account_types" VALUES (2, 'Post - Pago', '1');
INSERT INTO "public"."account_types" VALUES (3, 'Otro', '1');
INSERT INTO "public"."account_types" VALUES (4, 'Test', '1');
COMMIT;

-- ----------------------------
-- Table structure for brands
-- ----------------------------
CREATE TABLE "public"."brands" (
  "id" int8 NOT NULL DEFAULT nextval('brands_id_seq'::regclass),
  "name" text COLLATE "pg_catalog"."default" NOT NULL,
  "is_deleted" bool NOT NULL
)
;
ALTER TABLE "public"."brands" OWNER TO "postgres";

-- ----------------------------
-- Records of brands
-- ----------------------------
BEGIN;
INSERT INTO "public"."brands" VALUES (1, 'HUAWEI', 'f');
INSERT INTO "public"."brands" VALUES (2, 'OPTICTIMES', 'f');
INSERT INTO "public"."brands" VALUES (3, 'Felix Miguel', 't');
INSERT INTO "public"."brands" VALUES (4, 'Felix', 't');
COMMIT;

-- ----------------------------
-- Table structure for campaigns
-- ----------------------------
CREATE TABLE "public"."campaigns" (
  "id" int8 NOT NULL DEFAULT nextval('campaigns_id_seq'::regclass),
  "name" text COLLATE "pg_catalog"."default" NOT NULL,
  "start_date" int8 NOT NULL,
  "end_date" int8 NOT NULL
)
;
ALTER TABLE "public"."campaigns" OWNER TO "postgres";

-- ----------------------------
-- Records of campaigns
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for campaigns_to_plans
-- ----------------------------
CREATE TABLE "public"."campaigns_to_plans" (
  "id" int8 NOT NULL DEFAULT nextval('campaigns_to_plans_id_seq'::regclass),
  "campaigns_id" int8 NOT NULL,
  "plans_id" int8 NOT NULL
)
;
ALTER TABLE "public"."campaigns_to_plans" OWNER TO "postgres";

-- ----------------------------
-- Records of campaigns_to_plans
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for combinations
-- ----------------------------
CREATE TABLE "public"."combinations" (
  "id" int8 NOT NULL DEFAULT nextval('combinations_id_seq'::regclass),
  "filter_types_id" int8 NOT NULL,
  "filters_id" int8 NOT NULL
)
;
ALTER TABLE "public"."combinations" OWNER TO "postgres";

-- ----------------------------
-- Records of combinations
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for devices
-- ----------------------------
CREATE TABLE "public"."devices" (
  "id" uuid NOT NULL DEFAULT uuid_generate_v4(),
  "mac" varchar(12) COLLATE "pg_catalog"."default" NOT NULL,
  "is_deleted" bool NOT NULL,
  "pon" text COLLATE "pg_catalog"."default",
  "serie" varchar(200) COLLATE "pg_catalog"."default",
  "mac_wan" varchar(12) COLLATE "pg_catalog"."default",
  "created_at" timestamptz(6),
  "updated_at" timestamptz(6),
  "deleted_at" timestamptz(6),
  "models_id" int8,
  "subscribers_id" varchar(20) COLLATE "pg_catalog"."default" NOT NULL
)
;
ALTER TABLE "public"."devices" OWNER TO "postgres";

-- ----------------------------
-- Records of devices
-- ----------------------------
BEGIN;
INSERT INTO "public"."devices" VALUES ('b2bc7faf-b3b8-4e24-a24a-6bebc1a67e82', 'AAAEEE111333', 't', 'QWERTYPOIUY', '11111AAAAA55555', 'AAAEEE111344', NULL, NULL, '2018-06-27 15:54:44+00', 1, '1234567890');
INSERT INTO "public"."devices" VALUES ('9d7b05d3-e6e0-4095-9553-4fb147f506ab', 'AABBCCDDFF22', 't', 'ASDFGHÑLKJHG', '11223344', 'AABBCCDDFF33', NULL, NULL, '2018-06-27 15:54:44+00', 1, '123456789');
INSERT INTO "public"."devices" VALUES ('cd891f38-fb56-419b-91e7-ee809f41dd5e', '11AAEEFFCCBB', 't', 'CDEXSWZAQ', 'qazwsxedc', '11AAEEFFCCCC', NULL, NULL, '2018-06-27 15:54:44+00', 1, '123456789');
INSERT INTO "public"."devices" VALUES ('513e5f73-be63-4fcd-9438-2e3ee177a7c4', 'ABCDEF123456', 'f', '2323', '23213132', 'ABCDEF123467', NULL, NULL, NULL, 1, '43433845');
INSERT INTO "public"."devices" VALUES ('250c06ee-e338-419b-a68d-a7c0da28b83c', 'FFCCEEBB0000', 'f', 'QAZWSXEDCVFR', 'QWERTYPOIUY', 'FFCCEEBB0001', NULL, NULL, NULL, 1, '123456');
INSERT INTO "public"."devices" VALUES ('f78c437a-0ff9-4db5-8ca8-056baa20d80c', 'AAEE1122BB10', 't', 'MNBV1234ÑLJ567823456', 'MNBV1234ÑLJ5678', 'AAEE1122BB11', '2018-06-26 10:08:42+00', NULL, '2018-06-27 15:54:48+00', 1, '654987321');
INSERT INTO "public"."devices" VALUES ('9297ad79-9d3b-4a84-8c11-1a1e09fbe4dc', '345345345345', 't', '345345345', '32534534', '34534534534A', '2018-06-26 13:19:43+00', NULL, '2018-06-27 15:54:39+00', 2, '12345678');
INSERT INTO "public"."devices" VALUES ('0d840574-818e-4ccf-a8bf-81969d2f02ec', '234234234234', 't', '32434234', '23423423', '234234234235', '2018-06-26 13:23:02+00', NULL, '2018-06-27 15:54:39+00', 1, '12345678');
INSERT INTO "public"."devices" VALUES ('f90d3f23-594a-4dd3-ae2d-9c0548ff7469', 'CCBBAA112233', 't', 'OKMIJNUHB', 'qazwsxvfrcde', 'CCBBAA112234', '2018-06-27 10:38:45+00', NULL, '2018-06-27 15:54:52+00', 1, '135792468');
INSERT INTO "public"."devices" VALUES ('a788d225-362b-460b-a465-0dfc68ed91e2', '00DDB3AAEEFF', 't', 'OKMNBVGFRDAS465', 'EDCUHBRFVYGV', 'DDB3AAEF04', '2018-06-27 11:26:02+00', NULL, '2018-06-27 12:23:26+00', 2, '246813579');
INSERT INTO "public"."devices" VALUES ('2d82db37-3d2d-43ea-ac5e-b6f168c62c0a', '11223344EEFF', 't', 'DFHSRTHSRFTHST', 'ASXASDAEGFVA', '11223344EF00', '2018-06-27 12:00:10+00', NULL, '2018-06-27 12:23:26+00', 1, '246813579');
INSERT INTO "public"."devices" VALUES ('684518cd-eb25-4598-ad2a-26f27f15bfda', '22223344EEFF', 't', 'DTHSFTHJSRTJ', 'DRSHASDRHNINL', '22223344EF04', '2018-06-27 12:01:34+00', NULL, '2018-06-27 12:23:26+00', 2, '246813579');
INSERT INTO "public"."devices" VALUES ('c699175f-081a-454a-ab7d-feba4d5309a3', '00DD4455EEFF', 't', 'DSRHASWERYH', 'OJUBGSIYVBFLUS', 'DD4455EF00', '2018-06-27 12:02:23+00', NULL, '2018-06-27 12:23:26+00', 1, '246813579');
INSERT INTO "public"."devices" VALUES ('001a3b9b-1590-49f1-a81c-4b84604ee6ca', '00113355EEFF', 't', 'XSRGADRH', 'ADRGHFTHJSGDH', '113355EF04', '2018-06-27 12:06:39+00', NULL, '2018-06-27 12:23:26+00', 2, '246813579');
INSERT INTO "public"."devices" VALUES ('402fec52-373d-4950-bb1d-1a12341ed008', '00224466EEFF', 't', 'DTYJUIRTYKI', 'SERGSRTH', '224466EF00', '2018-06-27 12:06:56+00', NULL, '2018-06-27 12:23:26+00', 1, '246813579');
INSERT INTO "public"."devices" VALUES ('edff4ffa-5201-4bfd-9d8f-177494998461', 'CCBBAA112233', 't', 'SEDGFLIHSA', 'QEÑOHJASEGÑNº', 'CCBBAA112238', '2018-06-27 15:46:55+00', NULL, '2018-06-27 15:54:52+00', 2, '135792468');
INSERT INTO "public"."devices" VALUES ('1d3b9fc6-21d0-4328-88ad-0e36fa4612cb', '00112233EEFF', 't', 'DRHRB5YRG', 'RFVTGBYHNUJM', '00112233EF04', '2018-06-27 15:49:29+00', NULL, '2018-06-27 15:54:39+00', 2, '12345678');
INSERT INTO "public"."devices" VALUES ('70aa260b-1881-44e5-adab-adfd5dfe84b1', '00112233EEFF', 'f', 'EDCRFVTGB', 'QWERTYPOIUYT', '00112233EF04', '2018-06-27 15:56:53+00', NULL, NULL, 2, '1234567890');
INSERT INTO "public"."devices" VALUES ('811111bd-6eff-407f-b32a-658e4cd72996', '01020303AABB', 'f', 'QWER1234', 'Q1W2E3R4T5Y6', '01020303AABC', '2018-06-28 12:57:47+00', NULL, NULL, 1, '987654321');
INSERT INTO "public"."devices" VALUES ('01f4570d-2082-4627-a0d8-c36f456e56bb', 'C4FF1F55773A', 'f', '48575443FC0E469A', '2150083099EGHA005737', 'C4FF1F55773B', '2018-06-28 15:54:55+00', NULL, NULL, 3, '19660068');
INSERT INTO "public"."devices" VALUES ('b78a8876-f2f7-43a8-a482-ef0c43181c18', '0011AABBEEFF', 't', 'QAZOKMWSXIJN', 'QAZCDETGB', '0011AABBEF00', '2018-07-03 12:16:05+00', NULL, '2018-07-03 12:28:27+00', 1, '12345');
COMMIT;

-- ----------------------------
-- Table structure for download_limits
-- ----------------------------
CREATE TABLE "public"."download_limits" (
  "id" int8 NOT NULL DEFAULT nextval('download_limits_id_seq'::regclass),
  "code" varchar(2) COLLATE "pg_catalog"."default" NOT NULL,
  "value" int8 NOT NULL,
  "is_active" varchar(1) COLLATE "pg_catalog"."default" NOT NULL
)
;
ALTER TABLE "public"."download_limits" OWNER TO "postgres";

-- ----------------------------
-- Records of download_limits
-- ----------------------------
BEGIN;
INSERT INTO "public"."download_limits" VALUES (1, 'GB', 3, '1');
INSERT INTO "public"."download_limits" VALUES (2, 'GB', 4, '1');
INSERT INTO "public"."download_limits" VALUES (3, 'GB', 5, '1');
INSERT INTO "public"."download_limits" VALUES (4, 'GB', 10, '1');
INSERT INTO "public"."download_limits" VALUES (5, 'GB', 1, '1');
INSERT INTO "public"."download_limits" VALUES (6, '0 ', 0, '1');
COMMIT;

-- ----------------------------
-- Table structure for filter_types
-- ----------------------------
CREATE TABLE "public"."filter_types" (
  "id" int8 NOT NULL DEFAULT nextval('filter_types_id_seq'::regclass),
  "name" text COLLATE "pg_catalog"."default" NOT NULL,
  "is_active" varchar(1) COLLATE "pg_catalog"."default" NOT NULL
)
;
ALTER TABLE "public"."filter_types" OWNER TO "postgres";

-- ----------------------------
-- Records of filter_types
-- ----------------------------
BEGIN;
INSERT INTO "public"."filter_types" VALUES (0, 'Sin Filtros', '0');
INSERT INTO "public"."filter_types" VALUES (1, 'XXX', '1');
INSERT INTO "public"."filter_types" VALUES (2, 'RS', '1');
INSERT INTO "public"."filter_types" VALUES (3, 'GM', '1');
INSERT INTO "public"."filter_types" VALUES (4, 'VIDEO', '1');
COMMIT;

-- ----------------------------
-- Table structure for filters
-- ----------------------------
CREATE TABLE "public"."filters" (
  "id" int8 NOT NULL DEFAULT nextval('filters_id_seq'::regclass),
  "name" text COLLATE "pg_catalog"."default" NOT NULL,
  "is_deleted" bool NOT NULL
)
;
ALTER TABLE "public"."filters" OWNER TO "postgres";

-- ----------------------------
-- Records of filters
-- ----------------------------
BEGIN;
INSERT INTO "public"."filters" VALUES (0, 'Sin Filtros', 't');
INSERT INTO "public"."filters" VALUES (1, 'Streaming', 'f');
INSERT INTO "public"."filters" VALUES (2, 'Gaming', 'f');
INSERT INTO "public"."filters" VALUES (3, 'Redes Sociales', 'f');
INSERT INTO "public"."filters" VALUES (4, 'XXX', 'f');
INSERT INTO "public"."filters" VALUES (7, 'Pruebas de filtro 2', 't');
INSERT INTO "public"."filters" VALUES (8, 'XXX RS', 'f');
INSERT INTO "public"."filters" VALUES (9, 'XXX GM', 'f');
INSERT INTO "public"."filters" VALUES (10, 'XXX VIDEO', 'f');
INSERT INTO "public"."filters" VALUES (11, 'RS GM', 'f');
INSERT INTO "public"."filters" VALUES (12, 'RS VIDEO', 'f');
INSERT INTO "public"."filters" VALUES (13, 'GM VIDEO', 'f');
INSERT INTO "public"."filters" VALUES (14, 'XXX RS GM', 'f');
INSERT INTO "public"."filters" VALUES (15, 'XXX GM STREAMING', 'f');
INSERT INTO "public"."filters" VALUES (16, 'RS GM STREAMING', 'f');
INSERT INTO "public"."filters" VALUES (17, 'XXX RS GM STREAMING', 'f');
COMMIT;

-- ----------------------------
-- Table structure for menus
-- ----------------------------
CREATE TABLE "public"."menus" (
  "id" int8 NOT NULL DEFAULT nextval('menus_id_seq'::regclass),
  "name" text COLLATE "pg_catalog"."default" NOT NULL,
  "icon" text COLLATE "pg_catalog"."default",
  "menus_id" int8,
  "alias" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "description" text COLLATE "pg_catalog"."default",
  "is_leaf" bool,
  "orden" int8
)
;
ALTER TABLE "public"."menus" OWNER TO "postgres";

-- ----------------------------
-- Records of menus
-- ----------------------------
BEGIN;
INSERT INTO "public"."menus" VALUES (1, 'Planes', 'fa fa-dashborard', NULL, 'app_plan', 'Planes', 'f', 2);
INSERT INTO "public"."menus" VALUES (2, 'Suscriptores', 'fa fa-dashborard', NULL, 'app_subscriber', 'Suscriptores', 'f', 1);
INSERT INTO "public"."menus" VALUES (3, 'Filtros', 'fa fa-dash-board', NULL, 'app_filter', 'Filtros', 'f', 3);
INSERT INTO "public"."menus" VALUES (4, 'Listar Planes', '', 1, 'app_plan_list', 'Listar Planes', 't', 1);
INSERT INTO "public"."menus" VALUES (5, 'Crear Nuevos Planes', '', 1, 'app_plan_add', 'Crear Nuevos Planes', 't', 1);
INSERT INTO "public"."menus" VALUES (6, 'Editar Planes', '', 1, 'app_plan_update', 'Editar Planes', 't', 1);
INSERT INTO "public"."menus" VALUES (7, 'Eliminar Planes', '', 1, 'app_plan_delete', 'Eliminar Planes', 't', 1);
INSERT INTO "public"."menus" VALUES (8, 'Listar Suscriptores', '', 2, 'app_subscriber_list', 'Listar Suscriptores', 't', 1);
INSERT INTO "public"."menus" VALUES (9, 'Editar Suscriptores', NULL, 2, 'app_subscriber_update', 'Editar Suscriptores', 't', 1);
INSERT INTO "public"."menus" VALUES (10, 'Tipo de Cuenta', '', NULL, 'app_account_type', 'Tipos de Cuenta', 'f', 4);
INSERT INTO "public"."menus" VALUES (11, 'Tipo de Filtro', '', NULL, 'app_filter_type', 'Tipos de Filtro', 'f', 5);
INSERT INTO "public"."menus" VALUES (12, 'Límites de descarga', '', NULL, 'download_limit', 'Límites de descarga', 'f', 6);
INSERT INTO "public"."menus" VALUES (13, 'Velocidades', '', NULL, 'app_speed', 'Velocidades', 'f', 7);
INSERT INTO "public"."menus" VALUES (14, 'Marcas', '', NULL, 'app_brand', 'Marcas', 'f', 8);
INSERT INTO "public"."menus" VALUES (15, 'Modelos', '', NULL, 'app_model', 'Modelos', 'f', 9);
INSERT INTO "public"."menus" VALUES (16, 'Usuarios', '', NULL, 'app_user', 'Usuarios', 'f', 10);
INSERT INTO "public"."menus" VALUES (17, 'Roles', '', NULL, 'app_profile', 'Roles', 'f', 11);
INSERT INTO "public"."menus" VALUES (18, 'Crear Nuevos Suscriptores', '', 2, 'app_subscriber_add', 'Crear Nuevos Suscriptores', 't', 1);
INSERT INTO "public"."menus" VALUES (19, 'Eliminar Suscriptores', '', 2, 'app_subscriber_delete', 'Eliminar Suscriptores', 't', 1);
INSERT INTO "public"."menus" VALUES (20, 'Agregar Nuevos Dispositivos', '', 2, 'app_subscriber_adddevices', 'Agregar Nuevos Dispositivos', 't', 1);
INSERT INTO "public"."menus" VALUES (21, 'Dar de baja a los Dispositivos', '', 2, 'app_subscriber_deletedevices', 'Dar de baja a los Dispositivos', 't', 1);
INSERT INTO "public"."menus" VALUES (22, 'Listar Recargas', '', 2, 'app_recharge_list', 'Listar recargas', 't', 1);
INSERT INTO "public"."menus" VALUES (23, 'Agregar Recargas', '', 2, 'app_recharge_add', 'Agregar Recargas', 't', 1);
INSERT INTO "public"."menus" VALUES (24, 'Listar Filtros de Planes', '', 1, 'app_plan_getplanfilters', 'Listar Filtros de Planes', 't', 1);
INSERT INTO "public"."menus" VALUES (25, 'Actualizar Filtros de Planes', '', 1, 'app_plan_updateplanfilters', 'Actualizar Filtros de Planes', 't', 1);
INSERT INTO "public"."menus" VALUES (26, 'Listar Filtros', '', 3, 'app_filter_list', 'Listar Filtros', 't', 1);
INSERT INTO "public"."menus" VALUES (27, 'Crear Nuevos Filtros', '', 3, 'app_filter_add', 'Crear Nuevos Filtros', 't', 1);
INSERT INTO "public"."menus" VALUES (28, 'Editar Filtros', '', 3, 'app_filter_update', 'Editar Filtros', 't', 1);
INSERT INTO "public"."menus" VALUES (29, 'Eliminar Filtros', '', 3, 'app_filter_delete', 'Eliminar Filtros', 't', 1);
INSERT INTO "public"."menus" VALUES (30, 'Listar Combinaciones', '', 3, 'app_filter_listcombinations', 'Listar Combinaciones de Filtro', 't', 1);
INSERT INTO "public"."menus" VALUES (31, 'Actualizar Combinaciones', '', 3, 'app_filter_updatecombinations', 'Actualizar Combinaciones', 't', 1);
INSERT INTO "public"."menus" VALUES (32, 'Crear Nuevos Tipos de Cuentas', '', 10, 'app_accounttype_add', 'Crear Nuevos Tipos de Cuentas', 't', 1);
INSERT INTO "public"."menus" VALUES (33, 'Actualizar Tipos de Cuentas', '', 10, 'app_accounttype_update', 'Actualizar Tipos de Cuentas', 't', 1);
INSERT INTO "public"."menus" VALUES (34, 'Crear Nuevos Tipos de Filtro', '', 11, 'app_filtertype_add', 'Crear Nuevos Tipos de Filtro', 't', 1);
INSERT INTO "public"."menus" VALUES (35, 'Editar Tipos de Filtros', '', 11, 'app_filtertype_update', 'Editar Tipos de Filtros', 't', 1);
INSERT INTO "public"."menus" VALUES (36, 'Crear Nuevos Limites de Descargas', '', 12, 'app_downloadlimit_add', 'Crear Nuevos Limites de Descargas', 't', 1);
INSERT INTO "public"."menus" VALUES (37, 'Editar Limites de Descargas', '', 12, 'app_downloadlimit_update', 'Editar Limites de Descargas', 't', 1);
INSERT INTO "public"."menus" VALUES (38, 'Crear Nuevas Velocidades', '', 13, 'app_speed_add', 'Crear Nuevas Velocidades', 't', 1);
INSERT INTO "public"."menus" VALUES (39, 'Editar Velocidades', '', 13, 'app_speed_update', 'Editar Velocidades', 't', 1);
INSERT INTO "public"."menus" VALUES (40, 'Listar Marcas', '', 14, 'app_brand_listAll', 'Listar Marcas', 't', 1);
INSERT INTO "public"."menus" VALUES (41, 'Crear Nuevos Marcas', '', 14, 'app_brand_add', 'Crear Nuevos Marcas', 't', 1);
INSERT INTO "public"."menus" VALUES (42, 'Editar Marca', '', 14, 'app_brand_update', 'Editar Marca', 't', 1);
INSERT INTO "public"."menus" VALUES (43, 'Eliminar Marca', '', 14, 'app_brand_delete', 'Eliminar Marca', 't', 1);
INSERT INTO "public"."menus" VALUES (44, 'Listar Modelos', '', 15, 'app_model_listAll', 'Listar Modelos', 't', 1);
INSERT INTO "public"."menus" VALUES (45, 'Crear Nuevos Modelos', '', 15, 'app_model_add', 'Crear Nuevos Modelos', 't', 1);
INSERT INTO "public"."menus" VALUES (46, 'Editar Modelos', '', 15, 'app_model_update', 'Editar Modelos', 't', 1);
INSERT INTO "public"."menus" VALUES (47, 'Eliminar Modelos', '', 15, 'app_model_delete', 'Eliminar Modelos', 't', 1);
INSERT INTO "public"."menus" VALUES (48, 'Listar Usuarios', '', 16, 'app_user_list', 'Listar Usuarios', 't', 1);
INSERT INTO "public"."menus" VALUES (49, 'Crear Nuevos Usuarios', '', 16, 'app_user_add', 'Crear Nuevos Usuarios', 't', 1);
INSERT INTO "public"."menus" VALUES (50, 'Editar Usuarios', '', 16, 'app_user_update', 'Editar Usuarios', 't', 1);
INSERT INTO "public"."menus" VALUES (51, 'Eliminar Usuarios', '', 16, 'app_user_delete', 'Eliminar Usuarios', 't', 1);
INSERT INTO "public"."menus" VALUES (52, 'Listar Roles', '', 17, 'app_profile_list', 'Listar Roles', 't', 1);
INSERT INTO "public"."menus" VALUES (53, 'Crear Nuevos Roles', '', 17, 'app_profile_add', 'Crear Nuevos Roles', 't', 1);
INSERT INTO "public"."menus" VALUES (54, 'Editar Roles', '', 17, 'app_profile_update', 'Editar Roles', 't', 1);
INSERT INTO "public"."menus" VALUES (55, 'Eliminar Roles', '', 17, 'app_profile_delete', 'Eliminar Roles', 't', 1);
INSERT INTO "public"."menus" VALUES (56, 'Listar Dispositivos de Suscriptores', '', 2, 'app_subscriber_listdevices', 'Listar Dispositivos de Suscriptores', 't', 1);
INSERT INTO "public"."menus" VALUES (57, 'Trazas del Sistema', 'fa fa-dashborard', NULL, 'app_log', 'Trazas del Sistema', 'f', 12);
INSERT INTO "public"."menus" VALUES (58, 'Listar Trazas del Sistema', '', 57, 'app_log_index', 'Listar Trazas del Sistema', 't', 1);
INSERT INTO "public"."menus" VALUES (59, 'Eliminar Recargas', '', 2, 'app_recharge_deleteRecharges', 'Eliminar Recargas', 't', 1);
INSERT INTO "public"."menus" VALUES (60, 'Sesiones', 'fa fa-dashboard', NULL, 'app_session', 'Sesiones', 'f', 4);
INSERT INTO "public"."menus" VALUES (61, 'Listar Sessiones', NULL, 60, 'app_session_activenow', 'Listar Sessiones', 't', 1);
INSERT INTO "public"."menus" VALUES (62, 'Cerrar Conexion', '', 60, 'app_session_offconnection', 'Cerrar Conexion', 't', 1);
INSERT INTO "public"."menus" VALUES (63, 'Consumo por Suscriptor', '', 2, 'app_subscriber_consumo', 'Consumo por Suscriptor', 't', 1);
INSERT INTO "public"."menus" VALUES (64, 'Pausar Servicios', '', 2, 'app_subscriber_pauseService', 'Pausar Servicios', 't', 1);
COMMIT;

-- ----------------------------
-- Table structure for models
-- ----------------------------
CREATE TABLE "public"."models" (
  "id" int8 NOT NULL DEFAULT nextval('models_id_seq'::regclass),
  "name" text COLLATE "pg_catalog"."default" NOT NULL,
  "equation" text COLLATE "pg_catalog"."default" NOT NULL,
  "is_deleted" bool NOT NULL,
  "brands_id" int8 NOT NULL
)
;
ALTER TABLE "public"."models" OWNER TO "postgres";

-- ----------------------------
-- Records of models
-- ----------------------------
BEGIN;
INSERT INTO "public"."models" VALUES (1, 'HG8245Q2', 'MAC+1', 'f', 1);
INSERT INTO "public"."models" VALUES (2, 'Generico', 'MAC+5', 'f', 2);
INSERT INTO "public"."models" VALUES (3, 'HG8245H', 'MAC+1', 'f', 1);
COMMIT;

-- ----------------------------
-- Table structure for plans
-- ----------------------------
CREATE TABLE "public"."plans" (
  "id" int8 NOT NULL DEFAULT nextval('plans_id_seq'::regclass),
  "code" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "name" text COLLATE "pg_catalog"."default" NOT NULL,
  "description" text COLLATE "pg_catalog"."default",
  "valid_since" int8 NOT NULL,
  "valid_to" int8 NOT NULL,
  "duration" int8 NOT NULL,
  "allow_recharges" varchar(1) COLLATE "pg_catalog"."default" NOT NULL,
  "is_deleted" bool NOT NULL,
  "duration_type" varchar(20) COLLATE "pg_catalog"."default",
  "download_limits_id" int8 NOT NULL,
  "speed_down" int8 NOT NULL,
  "speed_up" int8 NOT NULL
)
;
ALTER TABLE "public"."plans" OWNER TO "postgres";

-- ----------------------------
-- Records of plans
-- ----------------------------
BEGIN;
INSERT INTO "public"."plans" VALUES (1, 'PLAN01', 'Plan 01', 'Plan descripción', 1527489814574, 1527489818574, 3600, '1', 'f', NULL, 1, 2, 1);
COMMIT;

-- ----------------------------
-- Table structure for plans_to_filters
-- ----------------------------
CREATE TABLE "public"."plans_to_filters" (
  "id" int8 NOT NULL DEFAULT nextval('plans_to_filters_id_seq'::regclass),
  "filters_id" int8 NOT NULL,
  "plans_id" int8 NOT NULL
)
;
ALTER TABLE "public"."plans_to_filters" OWNER TO "postgres";

-- ----------------------------
-- Records of plans_to_filters
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for profiles
-- ----------------------------
CREATE TABLE "public"."profiles" (
  "id" int8 NOT NULL DEFAULT nextval('profiles_id_seq'::regclass),
  "name" text COLLATE "pg_catalog"."default" NOT NULL,
  "description" text COLLATE "pg_catalog"."default"
)
;
ALTER TABLE "public"."profiles" OWNER TO "postgres";

-- ----------------------------
-- Records of profiles
-- ----------------------------
BEGIN;
INSERT INTO "public"."profiles" VALUES (1, 'ROLE_ADMIN', 'Usuario Administrador del Sistema');
INSERT INTO "public"."profiles" VALUES (2, 'ROLE_OPERARIO', 'El Operario del Sistema es el usuario que gestionara toda la información referente al almacen de dispositivos.');
INSERT INTO "public"."profiles" VALUES (3, 'ROLE_VISOR', 'Visualiza la Información del sistema');
INSERT INTO "public"."profiles" VALUES (4, 'ROLE_API', 'ACCESSO AL API');
INSERT INTO "public"."profiles" VALUES (5, 'ROLE_SUSCRIPTOR', 'Usuario suscriptor del Sistema el cual puede observar sus datos de Navegación');
COMMIT;

-- ----------------------------
-- Table structure for profiles_to_menus
-- ----------------------------
CREATE TABLE "public"."profiles_to_menus" (
  "id" int8 NOT NULL DEFAULT nextval('profiles_to_menus_id_seq'::regclass),
  "menus_id" int8 NOT NULL,
  "profiles_id" int8 NOT NULL
)
;
ALTER TABLE "public"."profiles_to_menus" OWNER TO "postgres";

-- ----------------------------
-- Records of profiles_to_menus
-- ----------------------------
BEGIN;
INSERT INTO "public"."profiles_to_menus" VALUES (307, 1, 3);
INSERT INTO "public"."profiles_to_menus" VALUES (308, 4, 3);
INSERT INTO "public"."profiles_to_menus" VALUES (309, 2, 3);
INSERT INTO "public"."profiles_to_menus" VALUES (310, 8, 3);
INSERT INTO "public"."profiles_to_menus" VALUES (311, 22, 3);
INSERT INTO "public"."profiles_to_menus" VALUES (312, 56, 3);
INSERT INTO "public"."profiles_to_menus" VALUES (313, 3, 3);
INSERT INTO "public"."profiles_to_menus" VALUES (314, 26, 3);
INSERT INTO "public"."profiles_to_menus" VALUES (315, 30, 3);
INSERT INTO "public"."profiles_to_menus" VALUES (316, 10, 3);
INSERT INTO "public"."profiles_to_menus" VALUES (317, 40, 3);
INSERT INTO "public"."profiles_to_menus" VALUES (318, 44, 3);
INSERT INTO "public"."profiles_to_menus" VALUES (319, 48, 3);
INSERT INTO "public"."profiles_to_menus" VALUES (337, 1, 2);
INSERT INTO "public"."profiles_to_menus" VALUES (338, 4, 2);
INSERT INTO "public"."profiles_to_menus" VALUES (339, 2, 2);
INSERT INTO "public"."profiles_to_menus" VALUES (340, 8, 2);
INSERT INTO "public"."profiles_to_menus" VALUES (341, 9, 2);
INSERT INTO "public"."profiles_to_menus" VALUES (342, 18, 2);
INSERT INTO "public"."profiles_to_menus" VALUES (343, 22, 2);
INSERT INTO "public"."profiles_to_menus" VALUES (344, 23, 2);
INSERT INTO "public"."profiles_to_menus" VALUES (345, 20, 2);
INSERT INTO "public"."profiles_to_menus" VALUES (346, 21, 2);
INSERT INTO "public"."profiles_to_menus" VALUES (347, 56, 2);
INSERT INTO "public"."profiles_to_menus" VALUES (1, 1, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (2, 4, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (3, 5, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (4, 6, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (5, 7, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (6, 24, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (7, 25, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (8, 2, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (9, 8, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (10, 9, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (11, 18, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (12, 19, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (13, 20, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (14, 21, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (15, 22, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (16, 23, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (17, 56, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (18, 59, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (19, 63, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (20, 64, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (21, 3, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (22, 26, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (23, 27, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (24, 28, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (25, 29, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (26, 30, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (27, 31, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (28, 10, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (29, 32, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (30, 33, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (31, 11, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (32, 34, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (33, 35, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (34, 12, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (35, 36, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (36, 37, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (37, 13, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (38, 38, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (39, 39, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (40, 14, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (41, 40, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (42, 41, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (43, 42, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (44, 43, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (45, 15, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (46, 44, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (47, 45, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (48, 46, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (49, 47, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (50, 16, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (51, 48, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (52, 49, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (53, 50, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (54, 51, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (55, 17, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (56, 52, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (57, 53, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (58, 54, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (59, 55, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (60, 57, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (61, 58, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (62, 60, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (63, 61, 1);
INSERT INTO "public"."profiles_to_menus" VALUES (64, 62, 1);
COMMIT;

-- ----------------------------
-- Table structure for recharges
-- ----------------------------
CREATE TABLE "public"."recharges" (
  "id" uuid NOT NULL DEFAULT uuid_generate_v4(),
  "is_finished" varchar(1) COLLATE "pg_catalog"."default" NOT NULL,
  "created_at" timestamptz(6),
  "is_deleted" bool NOT NULL,
  "deleted_at" timestamptz(6),
  "start_date" timestamptz(6),
  "end_date" timestamptz(6),
  "devices_id" uuid,
  "plans_id" int8 NOT NULL,
  "subscribers_id" varchar(20) COLLATE "pg_catalog"."default" NOT NULL
)
;
ALTER TABLE "public"."recharges" OWNER TO "postgres";

-- ----------------------------
-- Records of recharges
-- ----------------------------
BEGIN;
INSERT INTO "public"."recharges" VALUES ('8454b760-bb4b-4eaf-9f53-68c28146e9fa', 'f', '2020-03-30 10:17:48+00', 'f', NULL, '2020-03-30 00:00:00+00', '2020-04-29 23:59:59+00', '811111bd-6eff-407f-b32a-658e4cd72996', 1, '987654321');
COMMIT;

-- ----------------------------
-- Table structure for speeds
-- ----------------------------
CREATE TABLE "public"."speeds" (
  "id" int8 NOT NULL DEFAULT nextval('speeds_id_seq'::regclass),
  "code" varchar(4) COLLATE "pg_catalog"."default" NOT NULL,
  "value" int8 NOT NULL,
  "is_active" varchar(1) COLLATE "pg_catalog"."default" NOT NULL
)
;
ALTER TABLE "public"."speeds" OWNER TO "postgres";

-- ----------------------------
-- Records of speeds
-- ----------------------------
BEGIN;
INSERT INTO "public"."speeds" VALUES (1, 'Mbps', 10, '1');
INSERT INTO "public"."speeds" VALUES (2, 'Mbps', 20, '1');
INSERT INTO "public"."speeds" VALUES (3, 'Mbps', 30, '0');
INSERT INTO "public"."speeds" VALUES (4, 'Mbps', 50, '1');
INSERT INTO "public"."speeds" VALUES (5, 'Mbps', 100, '1');
INSERT INTO "public"."speeds" VALUES (6, 'Mbps', 1000, '0');
INSERT INTO "public"."speeds" VALUES (7, 'Mbps', 200, '1');
INSERT INTO "public"."speeds" VALUES (8, 'Mbps', 300, '1');
INSERT INTO "public"."speeds" VALUES (9, 'Mbps', 5, '1');
INSERT INTO "public"."speeds" VALUES (10, 'Mbps', 25, '1');
INSERT INTO "public"."speeds" VALUES (11, 'Mbps', 150, '1');
COMMIT;

-- ----------------------------
-- Table structure for subscribers
-- ----------------------------
CREATE TABLE "public"."subscribers" (
  "first_name" text COLLATE "pg_catalog"."default",
  "last_name" text COLLATE "pg_catalog"."default",
  "phone" varchar(50) COLLATE "pg_catalog"."default",
  "email" varchar(100) COLLATE "pg_catalog"."default",
  "type_ciu" varchar(10) COLLATE "pg_catalog"."default",
  "ciu" varchar(20) COLLATE "pg_catalog"."default" NOT NULL,
  "is_deleted" bool NOT NULL,
  "account_types_id" int8 NOT NULL
)
;
ALTER TABLE "public"."subscribers" OWNER TO "postgres";

-- ----------------------------
-- Records of subscribers
-- ----------------------------
BEGIN;
INSERT INTO "public"."subscribers" VALUES (NULL, NULL, NULL, NULL, 'RUC', '111222333', 't', 1);
INSERT INTO "public"."subscribers" VALUES (NULL, NULL, NULL, NULL, 'RUC', '123', 't', 1);
INSERT INTO "public"."subscribers" VALUES (NULL, NULL, NULL, NULL, 'RUC', '1234', 't', 1);
INSERT INTO "public"."subscribers" VALUES ('Angel', 'Perez', '891765234', 'aperez@pe.pe', 'DNI', '12345', 't', 1);
INSERT INTO "public"."subscribers" VALUES ('Juan', 'Meza', '123654987', 'jmeza@pe.pe', 'RUC', '123456', 't', 1);
INSERT INTO "public"."subscribers" VALUES (NULL, NULL, NULL, NULL, 'RUC', '1234567', 't', 1);
INSERT INTO "public"."subscribers" VALUES (NULL, NULL, NULL, NULL, 'RUC', '123456700', 't', 1);
INSERT INTO "public"."subscribers" VALUES ('Julio', 'Yanez', '112233', 'jya@pe.pe', 'RUC', '12345678', 't', 1);
INSERT INTO "public"."subscribers" VALUES (NULL, NULL, NULL, NULL, 'RUC', '123456780', 't', 1);
INSERT INTO "public"."subscribers" VALUES ('Carlos David', 'Moron Vegas', '111222333', 'cmoron@pe.pe', 'RUC', '123456789', 't', 1);
INSERT INTO "public"."subscribers" VALUES ('Raul', 'Sierra', '123456789', 'rsierra@pe.pe', 'CARNET', '1234567890', 'f', 1);
INSERT INTO "public"."subscribers" VALUES (NULL, NULL, NULL, NULL, 'DNI', '123546789', 't', 1);
INSERT INTO "public"."subscribers" VALUES ('Eduard', 'Colmenares', '584732159', 'rcolme@pe.pe', 'RUC', '135792468', 't', 1);
INSERT INTO "public"."subscribers" VALUES ('Juan', 'Avila', '12345', 'esd4556@gfsrt.co', 'DNI', '19660068', 'f', 1);
INSERT INTO "public"."subscribers" VALUES ('Ramon', 'Barboza', '951357741', 'rbarboza@pe.ve', 'RUC', '246813579', 't', 2);
INSERT INTO "public"."subscribers" VALUES (NULL, NULL, NULL, NULL, 'DNI', '43433845', 't', 1);
INSERT INTO "public"."subscribers" VALUES ('Ruben Carlos', 'Villegas', '321654987', 'rubven@pe.ve', 'DNI', '654987321', 't', 1);
INSERT INTO "public"."subscribers" VALUES ('Jorge', 'Peralta', '321654987', 'jperalta@pe.pe', 'CARNET', '987654321', 'f', 2);
INSERT INTO "public"."subscribers" VALUES ('Pedro', 'Cabrera', '912100123', 'pr0x@nauta.cu', 'DNI', '12323441', 'f', 1);
COMMIT;

-- ----------------------------
-- Table structure for users
-- ----------------------------
CREATE TABLE "public"."users" (
  "id" uuid NOT NULL DEFAULT uuid_generate_v4(),
  "username" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "password" varchar(200) COLLATE "pg_catalog"."default" NOT NULL,
  "api_key" varchar(200) COLLATE "pg_catalog"."default"
)
;
ALTER TABLE "public"."users" OWNER TO "postgres";

-- ----------------------------
-- Records of users
-- ----------------------------
BEGIN;
INSERT INTO "public"."users" VALUES ('f9f63da2-5305-440b-8bbd-2e52b637bc90', 'admin', '$2y$13$oWGyb1gV4/AlElwNvQ7vBuRmYlZILE3QUbtdcgWDCwKdLfHhwhClK', 'afd16d3c211a8abff6c863e201f022a2');
INSERT INTO "public"."users" VALUES ('b6bc0013-36c3-437a-8db5-6bbf8625b0f2', 'orange', '$2y$13$RbXXWO6PzhG8gg55Sp/b5OPuqYj06eGAfl1OeadqXKPPrtm2d/zx2', '9c23547720c7b3f5b8fe39c4cf9ed9c6');
COMMIT;

-- ----------------------------
-- Table structure for users_subscribers
-- ----------------------------
CREATE TABLE "public"."users_subscribers" (
  "id" uuid NOT NULL,
  "users_id" uuid,
  "subscribers_id" varchar(20) COLLATE "pg_catalog"."default"
)
;
ALTER TABLE "public"."users_subscribers" OWNER TO "postgres";

-- ----------------------------
-- Records of users_subscribers
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for users_to_profiles
-- ----------------------------
CREATE TABLE "public"."users_to_profiles" (
  "id" int8 NOT NULL DEFAULT nextval('users_to_profiles_id_seq'::regclass),
  "profiles_id" int8 NOT NULL,
  "users_id" uuid NOT NULL
)
;
ALTER TABLE "public"."users_to_profiles" OWNER TO "postgres";

-- ----------------------------
-- Records of users_to_profiles
-- ----------------------------
BEGIN;
INSERT INTO "public"."users_to_profiles" VALUES (1, 1, 'f9f63da2-5305-440b-8bbd-2e52b637bc90');
INSERT INTO "public"."users_to_profiles" VALUES (2, 4, 'f9f63da2-5305-440b-8bbd-2e52b637bc90');
INSERT INTO "public"."users_to_profiles" VALUES (7, 1, 'b6bc0013-36c3-437a-8db5-6bbf8625b0f2');
INSERT INTO "public"."users_to_profiles" VALUES (8, 4, 'b6bc0013-36c3-437a-8db5-6bbf8625b0f2');
COMMIT;

-- ----------------------------
-- Function structure for uuid_generate_v1
-- ----------------------------
DROP FUNCTION IF EXISTS "public"."uuid_generate_v1"();
CREATE OR REPLACE FUNCTION "public"."uuid_generate_v1"()
  RETURNS "pg_catalog"."uuid" AS '$libdir/uuid-ossp', 'uuid_generate_v1'
  LANGUAGE c VOLATILE STRICT
  COST 1;
ALTER FUNCTION "public"."uuid_generate_v1"() OWNER TO "postgres";

-- ----------------------------
-- Function structure for uuid_generate_v1mc
-- ----------------------------
DROP FUNCTION IF EXISTS "public"."uuid_generate_v1mc"();
CREATE OR REPLACE FUNCTION "public"."uuid_generate_v1mc"()
  RETURNS "pg_catalog"."uuid" AS '$libdir/uuid-ossp', 'uuid_generate_v1mc'
  LANGUAGE c VOLATILE STRICT
  COST 1;
ALTER FUNCTION "public"."uuid_generate_v1mc"() OWNER TO "postgres";

-- ----------------------------
-- Function structure for uuid_generate_v3
-- ----------------------------
DROP FUNCTION IF EXISTS "public"."uuid_generate_v3"("namespace" uuid, "name" text);
CREATE OR REPLACE FUNCTION "public"."uuid_generate_v3"("namespace" uuid, "name" text)
  RETURNS "pg_catalog"."uuid" AS '$libdir/uuid-ossp', 'uuid_generate_v3'
  LANGUAGE c IMMUTABLE STRICT
  COST 1;
ALTER FUNCTION "public"."uuid_generate_v3"("namespace" uuid, "name" text) OWNER TO "postgres";

-- ----------------------------
-- Function structure for uuid_generate_v4
-- ----------------------------
DROP FUNCTION IF EXISTS "public"."uuid_generate_v4"();
CREATE OR REPLACE FUNCTION "public"."uuid_generate_v4"()
  RETURNS "pg_catalog"."uuid" AS '$libdir/uuid-ossp', 'uuid_generate_v4'
  LANGUAGE c VOLATILE STRICT
  COST 1;
ALTER FUNCTION "public"."uuid_generate_v4"() OWNER TO "postgres";

-- ----------------------------
-- Function structure for uuid_generate_v5
-- ----------------------------
DROP FUNCTION IF EXISTS "public"."uuid_generate_v5"("namespace" uuid, "name" text);
CREATE OR REPLACE FUNCTION "public"."uuid_generate_v5"("namespace" uuid, "name" text)
  RETURNS "pg_catalog"."uuid" AS '$libdir/uuid-ossp', 'uuid_generate_v5'
  LANGUAGE c IMMUTABLE STRICT
  COST 1;
ALTER FUNCTION "public"."uuid_generate_v5"("namespace" uuid, "name" text) OWNER TO "postgres";

-- ----------------------------
-- Function structure for uuid_nil
-- ----------------------------
DROP FUNCTION IF EXISTS "public"."uuid_nil"();
CREATE OR REPLACE FUNCTION "public"."uuid_nil"()
  RETURNS "pg_catalog"."uuid" AS '$libdir/uuid-ossp', 'uuid_nil'
  LANGUAGE c IMMUTABLE STRICT
  COST 1;
ALTER FUNCTION "public"."uuid_nil"() OWNER TO "postgres";

-- ----------------------------
-- Function structure for uuid_ns_dns
-- ----------------------------
DROP FUNCTION IF EXISTS "public"."uuid_ns_dns"();
CREATE OR REPLACE FUNCTION "public"."uuid_ns_dns"()
  RETURNS "pg_catalog"."uuid" AS '$libdir/uuid-ossp', 'uuid_ns_dns'
  LANGUAGE c IMMUTABLE STRICT
  COST 1;
ALTER FUNCTION "public"."uuid_ns_dns"() OWNER TO "postgres";

-- ----------------------------
-- Function structure for uuid_ns_oid
-- ----------------------------
DROP FUNCTION IF EXISTS "public"."uuid_ns_oid"();
CREATE OR REPLACE FUNCTION "public"."uuid_ns_oid"()
  RETURNS "pg_catalog"."uuid" AS '$libdir/uuid-ossp', 'uuid_ns_oid'
  LANGUAGE c IMMUTABLE STRICT
  COST 1;
ALTER FUNCTION "public"."uuid_ns_oid"() OWNER TO "postgres";

-- ----------------------------
-- Function structure for uuid_ns_url
-- ----------------------------
DROP FUNCTION IF EXISTS "public"."uuid_ns_url"();
CREATE OR REPLACE FUNCTION "public"."uuid_ns_url"()
  RETURNS "pg_catalog"."uuid" AS '$libdir/uuid-ossp', 'uuid_ns_url'
  LANGUAGE c IMMUTABLE STRICT
  COST 1;
ALTER FUNCTION "public"."uuid_ns_url"() OWNER TO "postgres";

-- ----------------------------
-- Function structure for uuid_ns_x500
-- ----------------------------
DROP FUNCTION IF EXISTS "public"."uuid_ns_x500"();
CREATE OR REPLACE FUNCTION "public"."uuid_ns_x500"()
  RETURNS "pg_catalog"."uuid" AS '$libdir/uuid-ossp', 'uuid_ns_x500'
  LANGUAGE c IMMUTABLE STRICT
  COST 1;
ALTER FUNCTION "public"."uuid_ns_x500"() OWNER TO "postgres";

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."account_types_id_seq"
OWNED BY "public"."account_types"."id";
SELECT setval('"public"."account_types_id_seq"', 2, false);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."brands_id_seq"
OWNED BY "public"."brands"."id";
SELECT setval('"public"."brands_id_seq"', 5, true);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."campaigns_id_seq"
OWNED BY "public"."campaigns"."id";
SELECT setval('"public"."campaigns_id_seq"', 2, false);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."campaigns_to_plans_id_seq"
OWNED BY "public"."campaigns_to_plans"."id";
SELECT setval('"public"."campaigns_to_plans_id_seq"', 2, false);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."combinations_id_seq"
OWNED BY "public"."combinations"."id";
SELECT setval('"public"."combinations_id_seq"', 2, false);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."download_limits_id_seq"
OWNED BY "public"."download_limits"."id";
SELECT setval('"public"."download_limits_id_seq"', 2, false);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."filter_types_id_seq"
OWNED BY "public"."filter_types"."id";
SELECT setval('"public"."filter_types_id_seq"', 2, false);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."filters_id_seq"
OWNED BY "public"."filters"."id";
SELECT setval('"public"."filters_id_seq"', 2, false);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."menus_id_seq"
OWNED BY "public"."menus"."id";
SELECT setval('"public"."menus_id_seq"', 2, false);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."models_id_seq"
OWNED BY "public"."models"."id";
SELECT setval('"public"."models_id_seq"', 2, false);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."plans_id_seq"
OWNED BY "public"."plans"."id";
SELECT setval('"public"."plans_id_seq"', 2, false);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."plans_to_filters_id_seq"
OWNED BY "public"."plans_to_filters"."id";
SELECT setval('"public"."plans_to_filters_id_seq"', 2, false);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."profiles_id_seq"
OWNED BY "public"."profiles"."id";
SELECT setval('"public"."profiles_id_seq"', 2, false);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."profiles_to_menus_id_seq"
OWNED BY "public"."profiles_to_menus"."id";
SELECT setval('"public"."profiles_to_menus_id_seq"', 65, true);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."speeds_id_seq"
OWNED BY "public"."speeds"."id";
SELECT setval('"public"."speeds_id_seq"', 2, false);

-- ----------------------------
-- Alter sequences owned by
-- ----------------------------
ALTER SEQUENCE "public"."users_to_profiles_id_seq"
OWNED BY "public"."users_to_profiles"."id";
SELECT setval('"public"."users_to_profiles_id_seq"', 9, true);

-- ----------------------------
-- Primary Key structure for table account_types
-- ----------------------------
ALTER TABLE "public"."account_types" ADD CONSTRAINT "account_types_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table brands
-- ----------------------------
ALTER TABLE "public"."brands" ADD CONSTRAINT "brands_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table campaigns
-- ----------------------------
ALTER TABLE "public"."campaigns" ADD CONSTRAINT "campaigns_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table campaigns_to_plans
-- ----------------------------
CREATE INDEX "campaigns_to_plans_campaigns_id_07a3b649" ON "public"."campaigns_to_plans" USING btree (
  "campaigns_id" "pg_catalog"."int8_ops" ASC NULLS LAST
);
CREATE INDEX "campaigns_to_plans_plans_id_9c584c29" ON "public"."campaigns_to_plans" USING btree (
  "plans_id" "pg_catalog"."int8_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table campaigns_to_plans
-- ----------------------------
ALTER TABLE "public"."campaigns_to_plans" ADD CONSTRAINT "campaigns_to_plans_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table combinations
-- ----------------------------
CREATE INDEX "combinations_filter_types_id_8f35de4f" ON "public"."combinations" USING btree (
  "filter_types_id" "pg_catalog"."int8_ops" ASC NULLS LAST
);
CREATE INDEX "combinations_filters_id_789344b1" ON "public"."combinations" USING btree (
  "filters_id" "pg_catalog"."int8_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table combinations
-- ----------------------------
ALTER TABLE "public"."combinations" ADD CONSTRAINT "combinations_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table devices
-- ----------------------------
CREATE INDEX "devices_models_id_567aa6d9" ON "public"."devices" USING btree (
  "models_id" "pg_catalog"."int8_ops" ASC NULLS LAST
);
CREATE INDEX "devices_subscribers_id_69b8cf0d" ON "public"."devices" USING btree (
  "subscribers_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);
CREATE INDEX "devices_subscribers_id_69b8cf0d_like" ON "public"."devices" USING btree (
  "subscribers_id" COLLATE "pg_catalog"."default" "pg_catalog"."varchar_pattern_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table devices
-- ----------------------------
ALTER TABLE "public"."devices" ADD CONSTRAINT "devices_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table download_limits
-- ----------------------------
ALTER TABLE "public"."download_limits" ADD CONSTRAINT "download_limits_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table filter_types
-- ----------------------------
ALTER TABLE "public"."filter_types" ADD CONSTRAINT "filter_types_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table filters
-- ----------------------------
ALTER TABLE "public"."filters" ADD CONSTRAINT "filters_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table menus
-- ----------------------------
CREATE INDEX "menus_menus_id_2c7c8bb7" ON "public"."menus" USING btree (
  "menus_id" "pg_catalog"."int8_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table menus
-- ----------------------------
ALTER TABLE "public"."menus" ADD CONSTRAINT "menus_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table models
-- ----------------------------
CREATE INDEX "models_brands_id_f0439c2d" ON "public"."models" USING btree (
  "brands_id" "pg_catalog"."int8_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table models
-- ----------------------------
ALTER TABLE "public"."models" ADD CONSTRAINT "models_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table plans
-- ----------------------------
CREATE INDEX "plans_download_limits_id_b884985e" ON "public"."plans" USING btree (
  "download_limits_id" "pg_catalog"."int8_ops" ASC NULLS LAST
);
CREATE INDEX "plans_speed_down_6dee07ae" ON "public"."plans" USING btree (
  "speed_down" "pg_catalog"."int8_ops" ASC NULLS LAST
);
CREATE INDEX "plans_speed_up_74e75268" ON "public"."plans" USING btree (
  "speed_up" "pg_catalog"."int8_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table plans
-- ----------------------------
ALTER TABLE "public"."plans" ADD CONSTRAINT "plans_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table plans_to_filters
-- ----------------------------
CREATE INDEX "plans_to_filters_filters_id_3c60415b" ON "public"."plans_to_filters" USING btree (
  "filters_id" "pg_catalog"."int8_ops" ASC NULLS LAST
);
CREATE INDEX "plans_to_filters_plans_id_777031f7" ON "public"."plans_to_filters" USING btree (
  "plans_id" "pg_catalog"."int8_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table plans_to_filters
-- ----------------------------
ALTER TABLE "public"."plans_to_filters" ADD CONSTRAINT "plans_to_filters_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table profiles
-- ----------------------------
ALTER TABLE "public"."profiles" ADD CONSTRAINT "profiles_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table profiles_to_menus
-- ----------------------------
CREATE INDEX "profiles_to_menus_menus_id_825c6c43" ON "public"."profiles_to_menus" USING btree (
  "menus_id" "pg_catalog"."int8_ops" ASC NULLS LAST
);
CREATE INDEX "profiles_to_menus_profiles_id_87357a4e" ON "public"."profiles_to_menus" USING btree (
  "profiles_id" "pg_catalog"."int8_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table profiles_to_menus
-- ----------------------------
ALTER TABLE "public"."profiles_to_menus" ADD CONSTRAINT "profiles_to_menus_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table recharges
-- ----------------------------
CREATE INDEX "recharges_devices_id_f32864d4" ON "public"."recharges" USING btree (
  "devices_id" "pg_catalog"."uuid_ops" ASC NULLS LAST
);
CREATE INDEX "recharges_plans_id_20b3d4f0" ON "public"."recharges" USING btree (
  "plans_id" "pg_catalog"."int8_ops" ASC NULLS LAST
);
CREATE INDEX "recharges_subscribers_id_0e3d802e" ON "public"."recharges" USING btree (
  "subscribers_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);
CREATE INDEX "recharges_subscribers_id_0e3d802e_like" ON "public"."recharges" USING btree (
  "subscribers_id" COLLATE "pg_catalog"."default" "pg_catalog"."varchar_pattern_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table recharges
-- ----------------------------
ALTER TABLE "public"."recharges" ADD CONSTRAINT "recharges_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table speeds
-- ----------------------------
ALTER TABLE "public"."speeds" ADD CONSTRAINT "speeds_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table subscribers
-- ----------------------------
CREATE INDEX "subscribers_account_types_id_c98b123d" ON "public"."subscribers" USING btree (
  "account_types_id" "pg_catalog"."int8_ops" ASC NULLS LAST
);
CREATE INDEX "subscribers_ciu_70813fa2_like" ON "public"."subscribers" USING btree (
  "ciu" COLLATE "pg_catalog"."default" "pg_catalog"."varchar_pattern_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table subscribers
-- ----------------------------
ALTER TABLE "public"."subscribers" ADD CONSTRAINT "subscribers_pkey" PRIMARY KEY ("ciu");

-- ----------------------------
-- Primary Key structure for table users
-- ----------------------------
ALTER TABLE "public"."users" ADD CONSTRAINT "users_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table users_subscribers
-- ----------------------------
ALTER TABLE "public"."users_subscribers" ADD CONSTRAINT "users_suscribers_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table users_to_profiles
-- ----------------------------
CREATE INDEX "users_to_profiles_profiles_id_0cf3ae29" ON "public"."users_to_profiles" USING btree (
  "profiles_id" "pg_catalog"."int8_ops" ASC NULLS LAST
);
CREATE INDEX "users_to_profiles_users_id_bd9001a4" ON "public"."users_to_profiles" USING btree (
  "users_id" "pg_catalog"."uuid_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table users_to_profiles
-- ----------------------------
ALTER TABLE "public"."users_to_profiles" ADD CONSTRAINT "users_to_profiles_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Foreign Keys structure for table campaigns_to_plans
-- ----------------------------
ALTER TABLE "public"."campaigns_to_plans" ADD CONSTRAINT "campaigns_to_plans_campaigns_id_07a3b649_fk_campaigns_id" FOREIGN KEY ("campaigns_id") REFERENCES "public"."campaigns" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE "public"."campaigns_to_plans" ADD CONSTRAINT "campaigns_to_plans_plans_id_9c584c29_fk_plans_id" FOREIGN KEY ("plans_id") REFERENCES "public"."plans" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;

-- ----------------------------
-- Foreign Keys structure for table combinations
-- ----------------------------
ALTER TABLE "public"."combinations" ADD CONSTRAINT "combinations_filter_types_id_8f35de4f_fk_filter_types_id" FOREIGN KEY ("filter_types_id") REFERENCES "public"."filter_types" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE "public"."combinations" ADD CONSTRAINT "combinations_filters_id_789344b1_fk_filters_id" FOREIGN KEY ("filters_id") REFERENCES "public"."filters" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;

-- ----------------------------
-- Foreign Keys structure for table devices
-- ----------------------------
ALTER TABLE "public"."devices" ADD CONSTRAINT "devices_models_id_567aa6d9_fk_models_id" FOREIGN KEY ("models_id") REFERENCES "public"."models" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE "public"."devices" ADD CONSTRAINT "devices_subscribers_id_69b8cf0d_fk_subscribers_ciu" FOREIGN KEY ("subscribers_id") REFERENCES "public"."subscribers" ("ciu") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;

-- ----------------------------
-- Foreign Keys structure for table menus
-- ----------------------------
ALTER TABLE "public"."menus" ADD CONSTRAINT "menus_menus_id_2c7c8bb7_fk_menus_id" FOREIGN KEY ("menus_id") REFERENCES "public"."menus" ("id") ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED;

-- ----------------------------
-- Foreign Keys structure for table models
-- ----------------------------
ALTER TABLE "public"."models" ADD CONSTRAINT "models_brands_id_f0439c2d_fk_brands_id" FOREIGN KEY ("brands_id") REFERENCES "public"."brands" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;

-- ----------------------------
-- Foreign Keys structure for table plans
-- ----------------------------
ALTER TABLE "public"."plans" ADD CONSTRAINT "plans_download_limits_id_b884985e_fk_download_limits_id" FOREIGN KEY ("download_limits_id") REFERENCES "public"."download_limits" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE "public"."plans" ADD CONSTRAINT "plans_speed_down_6dee07ae_fk_speeds_id" FOREIGN KEY ("speed_down") REFERENCES "public"."speeds" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE "public"."plans" ADD CONSTRAINT "plans_speed_up_74e75268_fk_speeds_id" FOREIGN KEY ("speed_up") REFERENCES "public"."speeds" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;

-- ----------------------------
-- Foreign Keys structure for table plans_to_filters
-- ----------------------------
ALTER TABLE "public"."plans_to_filters" ADD CONSTRAINT "plans_to_filters_filters_id_3c60415b_fk_filters_id" FOREIGN KEY ("filters_id") REFERENCES "public"."filters" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE "public"."plans_to_filters" ADD CONSTRAINT "plans_to_filters_plans_id_777031f7_fk_plans_id" FOREIGN KEY ("plans_id") REFERENCES "public"."plans" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;

-- ----------------------------
-- Foreign Keys structure for table profiles_to_menus
-- ----------------------------
ALTER TABLE "public"."profiles_to_menus" ADD CONSTRAINT "profiles_to_menus_menus_id_825c6c43_fk_menus_id" FOREIGN KEY ("menus_id") REFERENCES "public"."menus" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE "public"."profiles_to_menus" ADD CONSTRAINT "profiles_to_menus_profiles_id_87357a4e_fk_profiles_id" FOREIGN KEY ("profiles_id") REFERENCES "public"."profiles" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;

-- ----------------------------
-- Foreign Keys structure for table recharges
-- ----------------------------
ALTER TABLE "public"."recharges" ADD CONSTRAINT "recharges_devices_id_f32864d4_fk_devices_id" FOREIGN KEY ("devices_id") REFERENCES "public"."devices" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE "public"."recharges" ADD CONSTRAINT "recharges_plans_id_20b3d4f0_fk_plans_id" FOREIGN KEY ("plans_id") REFERENCES "public"."plans" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE "public"."recharges" ADD CONSTRAINT "recharges_subscribers_id_0e3d802e_fk_subscribers_ciu" FOREIGN KEY ("subscribers_id") REFERENCES "public"."subscribers" ("ciu") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;

-- ----------------------------
-- Foreign Keys structure for table subscribers
-- ----------------------------
ALTER TABLE "public"."subscribers" ADD CONSTRAINT "subscribers_account_types_id_c98b123d_fk_account_types_id" FOREIGN KEY ("account_types_id") REFERENCES "public"."account_types" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;

-- ----------------------------
-- Foreign Keys structure for table users_subscribers
-- ----------------------------
ALTER TABLE "public"."users_subscribers" ADD CONSTRAINT "users_subscribers_subscribers_id_fkey" FOREIGN KEY ("subscribers_id") REFERENCES "public"."subscribers" ("ciu") ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE "public"."users_subscribers" ADD CONSTRAINT "users_subscribers_users_id_fkey" FOREIGN KEY ("users_id") REFERENCES "public"."users" ("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- ----------------------------
-- Foreign Keys structure for table users_to_profiles
-- ----------------------------
ALTER TABLE "public"."users_to_profiles" ADD CONSTRAINT "users_to_profiles_profiles_id_0cf3ae29_fk_profiles_id" FOREIGN KEY ("profiles_id") REFERENCES "public"."profiles" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE "public"."users_to_profiles" ADD CONSTRAINT "users_to_profiles_users_id_bd9001a4_fk_users_id" FOREIGN KEY ("users_id") REFERENCES "public"."users" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;
