CREATE DATABASE tkrb_myfavorit DEFAULT CHARACTER SET utf8;
CREATE TABLE users (
	id INT AUTO_INCREMENT,
	regist_date TIMESTAMP NOT NULL,
	PRIMARY KEY (id)
);
CREATE TABLE favorites (
	id INT AUTO_INCREMENT,
	user_id INT NOT NULL,
	web_api_id INT,
	image TEXT,
	title TEXT,
	comment TEXT,
	regist_date TIMESTAMP NOT NULL,
	CONSTRAINT fk_favorites_user FOREIGN KEY (user_id) REFERENCES users(id),
	PRIMARY KEY (id)
);
