CREATE TABLE `users` (
	`id_user` int(10) UNSIGNED auto_increment,
	`name` VARCHAR(100),
	`email` VARCHAR(320),
	`language` VARCHAR(2),
	`active` BOOLEAN,
	`led` TIMESTAMP NOT NULL ON UPDATE CURRENT_TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
	PRIMARY KEY (`id_user`),
	UNIQUE KEY `uni_email` (`email`)
);

ALTER TABLE posts ADD COLUMN id_user int(10) UNSIGNED AFTER id_project;
ALTER TABLE posts ADD INDEX(`id_user`);
ALTER TABLE posts ADD FOREIGN KEY (`id_user`) REFERENCES users(`id_user`);