     id_craftshop_users int not null auto_increment,
     id_user int,
     id_craftshop int,
-    id_rol in,
+    id_rol int,
     PRIMARY KEY(id_craftshop_users),
  CONSTRAINT `fk_id_user_craftshopuser` FOREIGN KEY (`id_user`) REFERENCES `user` (`id_user`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_id_craftsho_craftshopuser` FOREIGN KEY (`id_craftshop`) REFERENCES `craftshop` (`id_craftshop`) ON DELETE NO ACTION ON UPDATE NO ACTION,

--
-- Filtros para la tabla `product`
--
ALTER TABLE `product`
ADD CONSTRAINT `fk_user` FOREIGN KEY (`id_user`) REFERENCES `user` (`id_user`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Filtros para la tabla `product_language`

-- Estructura de tabla para la tabla `material`
--

CREATE TABLE IF NOT EXISTS craftshop(
    id_craftshop int not null auto_increment,
    name varchar(70),
    description varchar(255),
    PRIMARY KEY(id_craftshop)
)ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `material` (
`id_material` int(10) NOT NULL,
  `id_craftshop` int(10) DEFAULT NULL,
  `name` varchar(50) DEFAULT NULL,
  `id_category` int(10) NOT NULL,
  `id_measurement` int(10) DEFAULT NULL,
  `price` double DEFAULT NULL,
   CONSTRAINT `fk_id_craftshop_material` FOREIGN KEY (`id_craftshop`) REFERENCES `craftshop` (`id_craftshop`) ON DELETE NO ACTION ON UPDATE NO ACTION

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------
