-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from sproogen/develop
Merge v2.0.0
- Loading branch information
Showing
161 changed files
with
7,032 additions
and
3,765 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
namespace Application\Migrations; | ||
|
||
use Doctrine\DBAL\Migrations\AbstractMigration; | ||
use Doctrine\DBAL\Schema\Schema; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
class Version20170626180355 extends AbstractMigration | ||
{ | ||
/** | ||
* @param Schema $schema | ||
*/ | ||
public function up(Schema $schema) | ||
{ | ||
// this up() migration is auto-generated, please modify it to your needs | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('CREATE TABLE answer (id INT AUTO_INCREMENT NOT NULL, question_id INT DEFAULT NULL, answer LONGTEXT NOT NULL, INDEX IDX_DADD4A251E27F6BF (question_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB'); | ||
$this->addSql('CREATE TABLE login_attempt (id INT AUTO_INCREMENT NOT NULL, ip LONGTEXT NOT NULL, succesful TINYINT(1) NOT NULL, username LONGTEXT NOT NULL, password LONGTEXT NOT NULL, created DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB'); | ||
$this->addSql('CREATE TABLE question (id INT AUTO_INCREMENT NOT NULL, identifier VARCHAR(255) NOT NULL, question LONGTEXT NOT NULL, multiple_choice TINYINT(1) NOT NULL, deleted TINYINT(1) NOT NULL, created DATETIME NOT NULL, updated DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB'); | ||
$this->addSql('CREATE TABLE sessions (sess_id VARCHAR(255) NOT NULL, sess_data LONGBLOB NOT NULL, sess_time INT NOT NULL, sess_lifetime BIGINT NOT NULL, PRIMARY KEY(sess_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB'); | ||
$this->addSql('CREATE TABLE response (id INT AUTO_INCREMENT NOT NULL, question_id INT DEFAULT NULL, answer_id INT DEFAULT NULL, user_ip VARCHAR(100) NOT NULL, user_session_id VARCHAR(100) NOT NULL, custom_user_id VARCHAR(100) NOT NULL, created DATETIME NOT NULL, updated DATETIME NOT NULL, INDEX IDX_3E7B0BFB1E27F6BF (question_id), INDEX IDX_3E7B0BFBAA334807 (answer_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB'); | ||
$this->addSql('ALTER TABLE answer ADD CONSTRAINT FK_DADD4A251E27F6BF FOREIGN KEY (question_id) REFERENCES question (id)'); | ||
$this->addSql('ALTER TABLE response ADD CONSTRAINT FK_3E7B0BFB1E27F6BF FOREIGN KEY (question_id) REFERENCES question (id)'); | ||
$this->addSql('ALTER TABLE response ADD CONSTRAINT FK_3E7B0BFBAA334807 FOREIGN KEY (answer_id) REFERENCES answer (id)'); | ||
} | ||
|
||
/** | ||
* @param Schema $schema | ||
*/ | ||
public function down(Schema $schema) | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('ALTER TABLE response DROP FOREIGN KEY FK_3E7B0BFBAA334807'); | ||
$this->addSql('ALTER TABLE answer DROP FOREIGN KEY FK_DADD4A251E27F6BF'); | ||
$this->addSql('ALTER TABLE response DROP FOREIGN KEY FK_3E7B0BFB1E27F6BF'); | ||
$this->addSql('DROP TABLE answer'); | ||
$this->addSql('DROP TABLE login_attempt'); | ||
$this->addSql('DROP TABLE question'); | ||
$this->addSql('DROP TABLE sessions'); | ||
$this->addSql('DROP TABLE response'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
|
||
namespace Application\Migrations; | ||
|
||
use Doctrine\DBAL\Migrations\AbstractMigration; | ||
use Doctrine\DBAL\Schema\Schema; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
class Version20170626181829 extends AbstractMigration | ||
{ | ||
/** | ||
* @param Schema $schema | ||
*/ | ||
public function up(Schema $schema) | ||
{ | ||
// this up() migration is auto-generated, please modify it to your needs | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('ALTER TABLE answer DROP FOREIGN KEY FK_DADD4A251E27F6BF'); | ||
$this->addSql('ALTER TABLE response DROP FOREIGN KEY FK_3E7B0BFB1E27F6BF'); | ||
$this->addSql('RENAME TABLE question TO poll'); | ||
$this->addSql('DROP INDEX IDX_DADD4A251E27F6BF ON answer'); | ||
$this->addSql('ALTER TABLE answer CHANGE question_id poll_id INT DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE answer ADD CONSTRAINT FK_DADD4A253C947C0F FOREIGN KEY (poll_id) REFERENCES poll (id)'); | ||
$this->addSql('CREATE INDEX IDX_DADD4A253C947C0F ON answer (poll_id)'); | ||
$this->addSql('DROP INDEX IDX_3E7B0BFB1E27F6BF ON response'); | ||
$this->addSql('ALTER TABLE response CHANGE question_id poll_id INT DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE response ADD CONSTRAINT FK_3E7B0BFB3C947C0F FOREIGN KEY (poll_id) REFERENCES poll (id)'); | ||
$this->addSql('CREATE INDEX IDX_3E7B0BFB3C947C0F ON response (poll_id)'); | ||
} | ||
|
||
/** | ||
* @param Schema $schema | ||
*/ | ||
public function down(Schema $schema) | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('ALTER TABLE answer DROP FOREIGN KEY FK_DADD4A253C947C0F'); | ||
$this->addSql('ALTER TABLE response DROP FOREIGN KEY FK_3E7B0BFB3C947C0F'); | ||
$this->addSql('RENAME TABLE poll TO question'); | ||
$this->addSql('DROP INDEX IDX_DADD4A253C947C0F ON answer'); | ||
$this->addSql('ALTER TABLE answer CHANGE poll_id question_id INT DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE answer ADD CONSTRAINT FK_DADD4A251E27F6BF FOREIGN KEY (question_id) REFERENCES question (id)'); | ||
$this->addSql('CREATE INDEX IDX_DADD4A251E27F6BF ON answer (question_id)'); | ||
$this->addSql('DROP INDEX IDX_3E7B0BFB3C947C0F ON response'); | ||
$this->addSql('ALTER TABLE response CHANGE poll_id question_id INT DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE response ADD CONSTRAINT FK_3E7B0BFB1E27F6BF FOREIGN KEY (question_id) REFERENCES question (id)'); | ||
$this->addSql('CREATE INDEX IDX_3E7B0BFB1E27F6BF ON response (question_id)'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
coverage/** | ||
node_modules/** | ||
dist/** | ||
src/index.html |
Oops, something went wrong.