alter table dynamic_layers_types add column is_custom boolean DEFAULT false;

insert into dynamic_layers_types (id,name,variable,name_en,name_es,is_custom) values (15,'Personalizado 1', 'custom1','Custom 1','Personalizado 1',true);
insert into dynamic_layers_types (id,name,variable,name_en,name_es,is_custom) values (16,'Personalizado 2', 'custom2','Custom 2','Personalizado 2',true);
insert into dynamic_layers_types (id,name,variable,name_en,name_es,is_custom) values (17,'Personalizado 3', 'custom3','Custom 3','Personalizado 3',true);
insert into dynamic_layers_types (id,name,variable,name_en,name_es,is_custom) values (18,'Personalizado 4', 'custom4','Custom 4','Personalizado 4',true);
insert into dynamic_layers_types (id,name,variable,name_en,name_es,is_custom) values (19,'Personalizado 5', 'custom5','Custom 5','Personalizado 5',true);

create table dynamic_layer_custom_names (
	id serial primary key,
	type_id integer not null,
	crop_id integer not null,
	name varchar(100) not null,
	
	constraint type_id  foreign key (type_id) references dynamic_layers_types(id),
	constraint crop_id  foreign key (crop_id) references crops(id)
);


