CREATE TABLE location (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(150) NOT NULL, created_at DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE event_attendee (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, event_id INT DEFAULT NULL, response_status INT NOT NULL, is_organizer TINYINT(1) NOT NULL, is_speaker TINYINT(1) NOT NULL, INDEX IDX_57BC3CB7A76ED395 (user_id), INDEX IDX_57BC3CB771F7E88B (event_id), UNIQUE INDEX user_event (user_id, event_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE event (id INT AUTO_INCREMENT NOT NULL, organization_id INT DEFAULT NULL, name VARCHAR(200) NOT NULL, description LONGTEXT NOT NULL, start_datetime DATETIME NOT NULL, end_datetime DATETIME NOT NULL, max_attendees INT NOT NULL, visibility VARCHAR(50) NOT NULL, is_all_day_event TINYINT(1) NOT NULL, attendees_can_invite_others TINYINT(1) NOT NULL, attendees_can_see_other_attendees TINYINT(1) NOT NULL, send_notifications TINYINT(1) NOT NULL, created_at DATETIME NOT NULL, INDEX IDX_3BAE0AA732C8A3DE (organization_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE event_schedule (id INT AUTO_INCREMENT NOT NULL, event_id INT DEFAULT NULL, topic_id INT DEFAULT NULL, location_id INT DEFAULT NULL, language_id INT DEFAULT NULL, start_datetime DATETIME NOT NULL, end_datetime DATETIME NOT NULL, INDEX IDX_1CD4F82B71F7E88B (event_id), UNIQUE INDEX UNIQ_1CD4F82B1F55203D (topic_id), INDEX IDX_1CD4F82B64D218E (location_id), INDEX IDX_1CD4F82B82F1BAF4 (language_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE users (id INT AUTO_INCREMENT NOT NULL, username VARCHAR(255) NOT NULL, username_canonical VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, email_canonical VARCHAR(255) NOT NULL, enabled TINYINT(1) NOT NULL, salt VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, last_login DATETIME DEFAULT NULL, locked TINYINT(1) NOT NULL, expired TINYINT(1) NOT NULL, expires_at DATETIME DEFAULT NULL, confirmation_token VARCHAR(255) DEFAULT NULL, password_requested_at DATETIME DEFAULT NULL, roles LONGTEXT NOT NULL COMMENT '(DC2Type:array)', credentials_expired TINYINT(1) NOT NULL, credentials_expire_at DATETIME DEFAULT NULL, firstname VARCHAR(150) NOT NULL, lastname VARCHAR(150) NOT NULL, created_at DATETIME NOT NULL, UNIQUE INDEX UNIQ_1483A5E992FC23A8 (username_canonical), UNIQUE INDEX UNIQ_1483A5E9A0D96FBF (email_canonical), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE user_language (user_id INT NOT NULL, language_id INT NOT NULL, INDEX IDX_345695B5A76ED395 (user_id), INDEX IDX_345695B582F1BAF4 (language_id), PRIMARY KEY(user_id, language_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE organization (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(100) NOT NULL, created_at DATETIME NOT NULL, UNIQUE INDEX UNIQ_C1EE637C5E237E06 (name), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE speaker (id INT AUTO_INCREMENT NOT NULL, firstname VARCHAR(150) NOT NULL, lastname VARCHAR(150) NOT NULL, email VARCHAR(150) NOT NULL, www VARCHAR(250) NOT NULL, created_at DATETIME NOT NULL, UNIQUE INDEX UNIQ_7B85DB61E7927C74 (email), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE user_invitation (id INT AUTO_INCREMENT NOT NULL, organization_id INT DEFAULT NULL, email_token VARCHAR(50) NOT NULL, email VARCHAR(256) NOT NULL, created_at DATETIME NOT NULL, sent TINYINT(1) NOT NULL, expired TINYINT(1) NOT NULL, INDEX IDX_567AA74E32C8A3DE (organization_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE language (id INT AUTO_INCREMENT NOT NULL, code VARCHAR(10) NOT NULL, name VARCHAR(150) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE user_organization (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, organization_id INT DEFAULT NULL, position VARCHAR(150) DEFAULT NULL, is_responsible TINYINT(1) NOT NULL, INDEX IDX_41221F7EA76ED395 (user_id), INDEX IDX_41221F7E32C8A3DE (organization_id), UNIQUE INDEX user_orga (user_id, organization_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE topic (id INT AUTO_INCREMENT NOT NULL, speaker_id INT DEFAULT NULL, name VARCHAR(200) NOT NULL, created_at DATETIME NOT NULL, INDEX IDX_9D40DE1BD04A0F27 (speaker_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
ALTER TABLE event_attendee ADD CONSTRAINT FK_57BC3CB7A76ED395 FOREIGN KEY (user_id) REFERENCES users (id);
ALTER TABLE event_attendee ADD CONSTRAINT FK_57BC3CB771F7E88B FOREIGN KEY (event_id) REFERENCES event (id);
ALTER TABLE event ADD CONSTRAINT FK_3BAE0AA732C8A3DE FOREIGN KEY (organization_id) REFERENCES organization (id);
ALTER TABLE event_schedule ADD CONSTRAINT FK_1CD4F82B71F7E88B FOREIGN KEY (event_id) REFERENCES event (id);
ALTER TABLE event_schedule ADD CONSTRAINT FK_1CD4F82B1F55203D FOREIGN KEY (topic_id) REFERENCES topic (id);
ALTER TABLE event_schedule ADD CONSTRAINT FK_1CD4F82B64D218E FOREIGN KEY (location_id) REFERENCES location (id);
ALTER TABLE event_schedule ADD CONSTRAINT FK_1CD4F82B82F1BAF4 FOREIGN KEY (language_id) REFERENCES language (id);
ALTER TABLE user_language ADD CONSTRAINT FK_345695B5A76ED395 FOREIGN KEY (user_id) REFERENCES users (id);
ALTER TABLE user_language ADD CONSTRAINT FK_345695B582F1BAF4 FOREIGN KEY (language_id) REFERENCES language (id);
ALTER TABLE user_invitation ADD CONSTRAINT FK_567AA74E32C8A3DE FOREIGN KEY (organization_id) REFERENCES organization (id);
ALTER TABLE user_organization ADD CONSTRAINT FK_41221F7EA76ED395 FOREIGN KEY (user_id) REFERENCES users (id);
ALTER TABLE user_organization ADD CONSTRAINT FK_41221F7E32C8A3DE FOREIGN KEY (organization_id) REFERENCES organization (id);
ALTER TABLE topic ADD CONSTRAINT FK_9D40DE1BD04A0F27 FOREIGN KEY (speaker_id) REFERENCES users (id);
X-Powered-By: PHP/5.6.5
Content-type: text/html; charset=UTF-8

