thebadspace/migrations/Version20221226225509.php
Ro 3410abd70a Location Editing Part. 1
Now that full-text searching is set up in the DB, the next step is
data population. The adding and editing templates were added as long as
routes and base functionality to add single locations.

Adding works and editing is almost there but both still need to cleaned
up. The basic plumbing will be completed and then the tweaking to
account for roles and login status for the sake of security.

Part 2 will include clean up and and bulk uploads through the use of CSV
files.
2022-12-30 14:41:49 -08:00

37 lines
1.4 KiB
PHP

<?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 Version20221226225509 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 SEQUENCE location_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE TABLE location (id INT NOT NULL, uuid VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, url VARCHAR(255) NOT NULL, description TEXT NOT NULL, images JSON DEFAULT NULL, active BOOLEAN NOT NULL, rating VARCHAR(255) NOT NULL, added_by INT NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, updated_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, PRIMARY KEY(id))');
$this->addSql('COMMENT ON COLUMN location.created_at IS \'(DC2Type:datetime_immutable)\'');
$this->addSql('COMMENT ON COLUMN location.updated_at IS \'(DC2Type:datetime_immutable)\'');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('DROP SEQUENCE location_id_seq CASCADE');
$this->addSql('DROP TABLE location');
}
}