-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------





--
-- Create schema
--

USE etrazon;

--
-- Definition of table `albums`
--

CREATE TABLE `albums` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `nev` varchar(45) NOT NULL,
  `leiras` varchar(200) NOT NULL,
  `user_id` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `FK_albums_user_id` (`user_id`),
  CONSTRAINT `FK_albums_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `albums`
--

INSERT INTO `albums` (`id`,`nev`,`leiras`,`user_id`) VALUES 
 (1,'Album','Ez az első albumm',1);


--
-- Definition of table `images`
--

CREATE TABLE `images` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `nev` varchar(30) NOT NULL,
  `data` mediumblob NOT NULL,
  `album_id` int(10) unsigned NOT NULL,
  `thumb` blob NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `FK_images_album_id` (`album_id`),
  CONSTRAINT `FK_images_album_id` FOREIGN KEY (`album_id`) REFERENCES `albums` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;




