Add supervision table and change default target path
This commit is contained in:
parent
8b7f30875b
commit
4ee1050553
@ -21,7 +21,7 @@ security:
|
|||||||
login_path: app_login
|
login_path: app_login
|
||||||
check_path: app_login
|
check_path: app_login
|
||||||
enable_csrf: false
|
enable_csrf: false
|
||||||
default_target_path: app_dashboard
|
default_target_path: /dashboard
|
||||||
logout:
|
logout:
|
||||||
path: app_logout
|
path: app_logout
|
||||||
# where to redirect after logout
|
# where to redirect after logout
|
||||||
|
39
migrations/Version20241130014227.php
Normal file
39
migrations/Version20241130014227.php
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace DoctrineMigrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Auto-generated Migration: Please modify to your needs!
|
||||||
|
*/
|
||||||
|
final class Version20241130014227 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this up() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('CREATE TABLE supervision (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', worker_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', UNIQUE INDEX UNIQ_30C258C06B20BA36 (worker_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||||
|
$this->addSql('ALTER TABLE supervision ADD CONSTRAINT FK_30C258C06B20BA36 FOREIGN KEY (worker_id) REFERENCES user (id)');
|
||||||
|
$this->addSql('ALTER TABLE user ADD supervisor_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
|
||||||
|
$this->addSql('ALTER TABLE user ADD CONSTRAINT FK_8D93D64919E9AC5F FOREIGN KEY (supervisor_id) REFERENCES supervision (id)');
|
||||||
|
$this->addSql('CREATE INDEX IDX_8D93D64919E9AC5F ON user (supervisor_id)');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D64919E9AC5F');
|
||||||
|
$this->addSql('ALTER TABLE supervision DROP FOREIGN KEY FK_30C258C06B20BA36');
|
||||||
|
$this->addSql('DROP TABLE supervision');
|
||||||
|
$this->addSql('DROP INDEX IDX_8D93D64919E9AC5F ON user');
|
||||||
|
$this->addSql('ALTER TABLE user DROP supervisor_id');
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user