From 571b89729aaa6fc939530c2d46fe3adac0d6cbed Mon Sep 17 00:00:00 2001 From: Andrew Gardener Date: Wed, 19 Jun 2024 17:19:38 -0700 Subject: [PATCH] setting up migration to django requires fixing up table data for postgres and removing the entity linking from nines export to postgres instructions load production data into local dev mariadb run migrations to prep the data (this is destructive) install pgloader on local machine `brew update && brew install pgloader` run from your local machine in bep (old) folder `pgloader --dry-run pgloader.load` Then if it looks good run it for real `pgloader pgloader.load` --- docker-compose.yaml | 16 ++-- migrations/2024/06/Version20240619211029.php | 87 ++++++++++++++++++++ migrations/2024/06/Version20240619211030.php | 56 +++++++++++++ migrations/2024/06/Version20240619211031.php | 44 ++++++++++ migrations/2024/06/Version20240619211032.php | 42 ++++++++++ migrations/2024/06/Version20240619211033.php | 54 ++++++++++++ migrations/2024/06/Version20240619211034.php | 49 +++++++++++ migrations/2024/06/Version20240619211035.php | 31 +++++++ migrations/2024/06/Version20240619211036.php | 85 +++++++++++++++++++ pgloader.load | 11 +++ src/Entity/AbstractTerm.php | 53 ++++++++++++ src/Entity/Archdeaconry.php | 2 - src/Entity/Archive.php | 4 +- src/Entity/Book.php | 2 +- src/Entity/County.php | 4 +- src/Entity/Diocese.php | 4 +- src/Entity/Format.php | 2 +- src/Entity/Injunction.php | 2 +- src/Entity/LinkableTrait.php | 68 +++++++++++++++ src/Entity/ManuscriptSource.php | 4 +- src/Entity/Monarch.php | 2 +- src/Entity/Nation.php | 2 +- src/Entity/Parish.php | 4 +- src/Entity/PrintSource.php | 2 +- src/Entity/Province.php | 4 +- src/Entity/SourceCategory.php | 2 +- src/Entity/Town.php | 4 +- src/Entity/TransactionCategory.php | 2 +- src/Form/BookType.php | 2 +- 29 files changed, 611 insertions(+), 33 deletions(-) create mode 100644 migrations/2024/06/Version20240619211029.php create mode 100644 migrations/2024/06/Version20240619211030.php create mode 100644 migrations/2024/06/Version20240619211031.php create mode 100644 migrations/2024/06/Version20240619211032.php create mode 100644 migrations/2024/06/Version20240619211033.php create mode 100644 migrations/2024/06/Version20240619211034.php create mode 100644 migrations/2024/06/Version20240619211035.php create mode 100644 migrations/2024/06/Version20240619211036.php create mode 100644 pgloader.load create mode 100644 src/Entity/AbstractTerm.php create mode 100644 src/Entity/LinkableTrait.php diff --git a/docker-compose.yaml b/docker-compose.yaml index 9e48486..89b54cb 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,7 +1,7 @@ version: '3.8' services: db: - container_name: bep_db + container_name: bep_db_old image: mariadb:10.11 ports: - "13306:3306" @@ -22,13 +22,13 @@ services: retries: 120 app: - container_name: bep_app + container_name: bep_app_old # image: dhil/bep build: context: . target: bep ports: - - "8080:80" + - "8081:80" volumes: # code for development - .:/var/www/html @@ -52,8 +52,8 @@ services: db: condition: service_healthy - mail: - container_name: bep_mail - image: jcalonso/mailhog:v1.0.1 - ports: - - "8025:8025" \ No newline at end of file + # mail: + # container_name: bep_mail + # image: jcalonso/mailhog:v1.0.1 + # ports: + # - "8025:8025" \ No newline at end of file diff --git a/migrations/2024/06/Version20240619211029.php b/migrations/2024/06/Version20240619211029.php new file mode 100644 index 0000000..2239337 --- /dev/null +++ b/migrations/2024/06/Version20240619211029.php @@ -0,0 +1,87 @@ +addSql('DROP INDEX UNIQ_36CE5E075E237E06 ON archdeaconry'); + $this->addSql('ALTER TABLE archdeaconry ADD links LONGTEXT DEFAULT NULL, DROP name'); + $this->addSql('DROP INDEX UNIQ_D5FC5D9C5E237E06 ON archive'); + $this->addSql('ALTER TABLE archive ADD links LONGTEXT DEFAULT NULL, DROP name'); + $this->addSql('ALTER TABLE book ADD links LONGTEXT DEFAULT NULL'); + $this->addSql('DROP INDEX UNIQ_58E2FF255E237E06 ON county'); + $this->addSql('ALTER TABLE county ADD links LONGTEXT DEFAULT NULL, DROP name'); + $this->addSql('DROP INDEX UNIQ_8849E7425E237E06 ON diocese'); + $this->addSql('ALTER TABLE diocese ADD links LONGTEXT DEFAULT NULL, DROP name'); + $this->addSql('DROP INDEX UNIQ_DEBA72DF5E237E06 ON format'); + $this->addSql('ALTER TABLE format DROP name'); + $this->addSql('ALTER TABLE injunction ADD links LONGTEXT DEFAULT NULL'); + $this->addSql('DROP INDEX UNIQ_CE3EE8025E237E06 ON manuscript_source'); + $this->addSql('ALTER TABLE manuscript_source ADD links LONGTEXT DEFAULT NULL, DROP name'); + $this->addSql('DROP INDEX UNIQ_71FB7BAE5E237E06 ON monarch'); + $this->addSql('ALTER TABLE monarch DROP name'); + $this->addSql('DROP INDEX UNIQ_CC5A6D275E237E06 ON nation'); + $this->addSql('ALTER TABLE nation DROP name'); + $this->addSql('DROP INDEX UNIQ_DFF9A9785E237E06 ON parish'); + $this->addSql('ALTER TABLE parish ADD links LONGTEXT DEFAULT NULL, DROP name'); + $this->addSql('ALTER TABLE print_source ADD links LONGTEXT DEFAULT NULL'); + $this->addSql('DROP INDEX UNIQ_4ADAD40B5E237E06 ON province'); + $this->addSql('ALTER TABLE province ADD links LONGTEXT DEFAULT NULL, DROP name'); + $this->addSql('DROP INDEX UNIQ_456C2F135E237E06 ON source_category'); + $this->addSql('ALTER TABLE source_category DROP name'); + $this->addSql('DROP INDEX UNIQ_4CE6C7A45E237E06 ON town'); + $this->addSql('ALTER TABLE town ADD links LONGTEXT DEFAULT NULL, DROP name'); + $this->addSql('DROP INDEX UNIQ_483E30A95E237E06 ON transaction_category'); + $this->addSql('ALTER TABLE transaction_category DROP name'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE source_category ADD name VARCHAR(191) NOT NULL'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_456C2F135E237E06 ON source_category (name)'); + $this->addSql('ALTER TABLE format ADD name VARCHAR(191) NOT NULL'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_DEBA72DF5E237E06 ON format (name)'); + $this->addSql('ALTER TABLE archdeaconry ADD name VARCHAR(191) NOT NULL, DROP links'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_36CE5E075E237E06 ON archdeaconry (name)'); + $this->addSql('ALTER TABLE transaction_category ADD name VARCHAR(191) NOT NULL'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_483E30A95E237E06 ON transaction_category (name)'); + $this->addSql('ALTER TABLE nation ADD name VARCHAR(191) NOT NULL'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_CC5A6D275E237E06 ON nation (name)'); + $this->addSql('ALTER TABLE injunction DROP links'); + $this->addSql('ALTER TABLE parish ADD name VARCHAR(191) NOT NULL, DROP links'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_DFF9A9785E237E06 ON parish (name)'); + $this->addSql('ALTER TABLE county ADD name VARCHAR(191) NOT NULL, DROP links'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_58E2FF255E237E06 ON county (name)'); + $this->addSql('ALTER TABLE province ADD name VARCHAR(191) NOT NULL, DROP links'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_4ADAD40B5E237E06 ON province (name)'); + $this->addSql('ALTER TABLE print_source DROP links'); + $this->addSql('ALTER TABLE diocese ADD name VARCHAR(191) NOT NULL, DROP links'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_8849E7425E237E06 ON diocese (name)'); + $this->addSql('ALTER TABLE town ADD name VARCHAR(191) NOT NULL, DROP links'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_4CE6C7A45E237E06 ON town (name)'); + $this->addSql('ALTER TABLE archive ADD name VARCHAR(191) NOT NULL, DROP links'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_D5FC5D9C5E237E06 ON archive (name)'); + $this->addSql('ALTER TABLE monarch ADD name VARCHAR(191) NOT NULL'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_71FB7BAE5E237E06 ON monarch (name)'); + $this->addSql('ALTER TABLE book DROP links'); + $this->addSql('ALTER TABLE manuscript_source ADD name VARCHAR(191) NOT NULL, DROP links'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_CE3EE8025E237E06 ON manuscript_source (name)'); + } +} diff --git a/migrations/2024/06/Version20240619211030.php b/migrations/2024/06/Version20240619211030.php new file mode 100644 index 0000000..fa2a5e3 --- /dev/null +++ b/migrations/2024/06/Version20240619211030.php @@ -0,0 +1,56 @@ +addSql(" + UPDATE $tableName, ( + SELECT $tableName.id, COALESCE(CONCAT('{', GROUP_CONCAT(nines_media_link.url ORDER BY nines_media_link.id SEPARATOR ','), '}'), '{}') AS links + FROM $tableName + LEFT JOIN nines_media_link ON nines_media_link.entity = CONCAT('App\\\\Entity\\\\$entityName:', $tableName.id) + GROUP BY nines_media_link.entity + ) as links_query + SET $tableName.links = links_query.links + WHERE $tableName.id = links_query.id + "); + } + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + } +} diff --git a/migrations/2024/06/Version20240619211031.php b/migrations/2024/06/Version20240619211031.php new file mode 100644 index 0000000..b514e75 --- /dev/null +++ b/migrations/2024/06/Version20240619211031.php @@ -0,0 +1,44 @@ +addSql(" + UPDATE $tableName + SET variant_titles = REGEXP_REPLACE( + REGEXP_REPLACE( + REGEXP_REPLACE( + variant_titles, '^a:[0-9]+:|i:[0-9]+;s:[0-9]+:', '' + ), + '\";}', '\"}' + ), + '\";\"', '\",\"' + ) + "); + } + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + } +} diff --git a/migrations/2024/06/Version20240619211032.php b/migrations/2024/06/Version20240619211032.php new file mode 100644 index 0000000..bb4a736 --- /dev/null +++ b/migrations/2024/06/Version20240619211032.php @@ -0,0 +1,42 @@ +addSql('ALTER TABLE nines_media_image DROP original_name'); + $this->addSql('ALTER TABLE nines_media_image DROP file_size'); + $this->addSql('ALTER TABLE nines_media_image DROP mime_type'); + $this->addSql('ALTER TABLE nines_media_image DROP `checksum`'); + $this->addSql('ALTER TABLE nines_media_image DROP source_url'); + $this->addSql('ALTER TABLE nines_media_image CHANGE `path` `image` varchar(255)'); + $this->addSql('ALTER TABLE nines_media_image CHANGE `thumb_path` `thumbnail` varchar(255)'); + + $this->addSql(" + UPDATE nines_media_image + SET entity = REGEXP_REPLACE(entity, '^[a-zA-Z]+.[a-zA-Z]+.[a-zA-Z]+.', '') + "); + $this->addSql('ALTER TABLE nines_media_image CHANGE `entity` `holding_id` int(11)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + } +} diff --git a/migrations/2024/06/Version20240619211033.php b/migrations/2024/06/Version20240619211033.php new file mode 100644 index 0000000..d03fdb3 --- /dev/null +++ b/migrations/2024/06/Version20240619211033.php @@ -0,0 +1,54 @@ +addSql('RENAME TABLE archdeaconry to bep_archdeaconry'); + $this->addSql('RENAME TABLE archive to bep_archive'); + $this->addSql('RENAME TABLE book to bep_book'); + $this->addSql('RENAME TABLE county to bep_county'); + $this->addSql('RENAME TABLE diocese to bep_diocese'); + $this->addSql('RENAME TABLE format to bep_format'); + $this->addSql('RENAME TABLE holding to bep_holding'); + $this->addSql('RENAME TABLE holding_book to bep_holding_books'); + $this->addSql('RENAME TABLE nines_media_image to bep_holding_image'); + $this->addSql('RENAME TABLE injunction to bep_injunction'); + $this->addSql('RENAME TABLE inventory to bep_inventory'); + $this->addSql('RENAME TABLE inventory_book to bep_inventory_books'); + $this->addSql('RENAME TABLE manuscript_source to bep_manuscript_source'); + $this->addSql('RENAME TABLE monarch to bep_monarch'); + $this->addSql('RENAME TABLE nation to bep_nation'); + $this->addSql('RENAME TABLE parish to bep_parish'); + $this->addSql('RENAME TABLE print_source to bep_print_source'); + $this->addSql('RENAME TABLE province to bep_province'); + $this->addSql('RENAME TABLE source_category to bep_source_category'); + $this->addSql('RENAME TABLE town to bep_town'); + $this->addSql('RENAME TABLE transact to bep_transact'); + $this->addSql('RENAME TABLE transaction_book to bep_transaction_books'); + $this->addSql('RENAME TABLE transaction_category to bep_transaction_category'); + $this->addSql('RENAME TABLE transaction_transaction_category to bep_transaction_transaction_categories'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + } +} diff --git a/migrations/2024/06/Version20240619211034.php b/migrations/2024/06/Version20240619211034.php new file mode 100644 index 0000000..ce3b572 --- /dev/null +++ b/migrations/2024/06/Version20240619211034.php @@ -0,0 +1,49 @@ +addSql('UPDATE nines_user SET `password` = ""'); + $this->addSql('ALTER TABLE nines_user CHANGE `login` `last_login` datetime'); + $this->addSql('ALTER TABLE nines_user ADD is_superuser tinyint(1) DEFAULT False'); + $this->addSql('UPDATE nines_user SET `is_superuser` = roles like \'%"ROLE_ADMIN"%\''); + $this->addSql('ALTER TABLE nines_user ADD username varchar(150) DEFAULT ""'); + $this->addSql('UPDATE nines_user SET `username` = REGEXP_REPLACE(email, "\@.*$", "")'); + $this->addSql('ALTER TABLE nines_user ADD first_name varchar(150) DEFAULT ""'); + $this->addSql('ALTER TABLE nines_user ADD last_name varchar(150) DEFAULT ""'); + $this->addSql('UPDATE nines_user SET `first_name` = REGEXP_REPLACE(fullname, " .*$", "")'); + $this->addSql('UPDATE nines_user SET `last_name` = REGEXP_REPLACE(fullname, "^.* ", "")'); + $this->addSql('ALTER TABLE nines_user ADD is_staff tinyint(1) DEFAULT True'); + $this->addSql('ALTER TABLE nines_user CHANGE `active` `is_active` tinyint(1)'); + $this->addSql('ALTER TABLE nines_user CHANGE `created` `date_joined` datetime'); + $this->addSql('ALTER TABLE nines_user DROP reset_token'); + $this->addSql('ALTER TABLE nines_user DROP reset_expiry'); + $this->addSql('ALTER TABLE nines_user DROP fullname'); + $this->addSql('ALTER TABLE nines_user DROP roles'); + $this->addSql('ALTER TABLE nines_user DROP updated'); + $this->addSql('ALTER TABLE nines_user DROP affiliation'); + $this->addSql('RENAME TABLE nines_user to auth_user'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + } +} diff --git a/migrations/2024/06/Version20240619211035.php b/migrations/2024/06/Version20240619211035.php new file mode 100644 index 0000000..c1e8f84 --- /dev/null +++ b/migrations/2024/06/Version20240619211035.php @@ -0,0 +1,31 @@ +addSql('RENAME TABLE bep_transact to bep_transaction'); + $this->addSql('ALTER TABLE bep_transaction_transaction_categories CHANGE `transaction_category_id` `transactioncategory_id` int(11)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + } +} diff --git a/migrations/2024/06/Version20240619211036.php b/migrations/2024/06/Version20240619211036.php new file mode 100644 index 0000000..0534103 --- /dev/null +++ b/migrations/2024/06/Version20240619211036.php @@ -0,0 +1,85 @@ +addSql("UPDATE $tableName SET $columnName = '' WHERE $columnName IS NULL"); + } + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + } +} diff --git a/pgloader.load b/pgloader.load new file mode 100644 index 0000000..f891a77 --- /dev/null +++ b/pgloader.load @@ -0,0 +1,11 @@ +LOAD DATABASE + FROM mysql://bep:password@127.0.0.1:13306/bep + INTO postgresql://bep:password@127.0.0.1:15432/bep + +-- WITH include no drop, no truncate, create no tables, create no indexes, reset sequences, no foreign keys, drop indexes +WITH data only + +ALTER SCHEMA 'bep' RENAME TO 'public' + +INCLUDING ONLY TABLE NAMES MATCHING ~/bep.*/, 'auth_user' +; \ No newline at end of file diff --git a/src/Entity/AbstractTerm.php b/src/Entity/AbstractTerm.php new file mode 100644 index 0000000..cb1484b --- /dev/null +++ b/src/Entity/AbstractTerm.php @@ -0,0 +1,53 @@ +label; + } + + public function setLabel(string $label) : self { + $this->label = $label; + + return $this; + } + + public function getLabel() : ?string { + return $this->label; + } + + public function setDescription(string $description) : self { + $this->description = $description; + + return $this; + } + + public function getDescription() : ?string { + return $this->description; + } +} diff --git a/src/Entity/Archdeaconry.php b/src/Entity/Archdeaconry.php index e65fe5b..ed8f5b9 100644 --- a/src/Entity/Archdeaconry.php +++ b/src/Entity/Archdeaconry.php @@ -9,8 +9,6 @@ use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Nines\MediaBundle\Entity\LinkableInterface; -use Nines\MediaBundle\Entity\LinkableTrait; -use Nines\UtilBundle\Entity\AbstractTerm; #[ORM\Entity(repositoryClass: ArchdeaconryRepository::class)] class Archdeaconry extends AbstractTerm implements LinkableInterface { diff --git a/src/Entity/Archive.php b/src/Entity/Archive.php index 065b11e..49e5e13 100644 --- a/src/Entity/Archive.php +++ b/src/Entity/Archive.php @@ -9,8 +9,8 @@ use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Nines\MediaBundle\Entity\LinkableInterface; -use Nines\MediaBundle\Entity\LinkableTrait; -use Nines\UtilBundle\Entity\AbstractTerm; + + #[ORM\Entity(repositoryClass: ArchiveRepository::class)] class Archive extends AbstractTerm implements LinkableInterface { diff --git a/src/Entity/Book.php b/src/Entity/Book.php index fd96300..1982343 100644 --- a/src/Entity/Book.php +++ b/src/Entity/Book.php @@ -9,7 +9,7 @@ use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Nines\MediaBundle\Entity\LinkableInterface; -use Nines\MediaBundle\Entity\LinkableTrait; + use Nines\UtilBundle\Entity\AbstractEntity; #[ORM\Table] diff --git a/src/Entity/County.php b/src/Entity/County.php index e89e11b..9efb13b 100644 --- a/src/Entity/County.php +++ b/src/Entity/County.php @@ -9,8 +9,8 @@ use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Nines\MediaBundle\Entity\LinkableInterface; -use Nines\MediaBundle\Entity\LinkableTrait; -use Nines\UtilBundle\Entity\AbstractTerm; + + #[ORM\Entity(repositoryClass: CountyRepository::class)] class County extends AbstractTerm implements LinkableInterface { diff --git a/src/Entity/Diocese.php b/src/Entity/Diocese.php index b25b04e..1a8c322 100644 --- a/src/Entity/Diocese.php +++ b/src/Entity/Diocese.php @@ -9,8 +9,8 @@ use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Nines\MediaBundle\Entity\LinkableInterface; -use Nines\MediaBundle\Entity\LinkableTrait; -use Nines\UtilBundle\Entity\AbstractTerm; + + #[ORM\Entity(repositoryClass: DioceseRepository::class)] class Diocese extends AbstractTerm implements LinkableInterface { diff --git a/src/Entity/Format.php b/src/Entity/Format.php index 120cc55..5a4efd0 100644 --- a/src/Entity/Format.php +++ b/src/Entity/Format.php @@ -8,7 +8,7 @@ use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; -use Nines\UtilBundle\Entity\AbstractTerm; + #[ORM\Entity(repositoryClass: FormatRepository::class)] class Format extends AbstractTerm { diff --git a/src/Entity/Injunction.php b/src/Entity/Injunction.php index 094d386..bb54c35 100644 --- a/src/Entity/Injunction.php +++ b/src/Entity/Injunction.php @@ -9,7 +9,7 @@ use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Nines\MediaBundle\Entity\LinkableInterface; -use Nines\MediaBundle\Entity\LinkableTrait; + use Nines\UtilBundle\Entity\AbstractEntity; #[ORM\Table] diff --git a/src/Entity/LinkableTrait.php b/src/Entity/LinkableTrait.php new file mode 100644 index 0000000..9e588f8 --- /dev/null +++ b/src/Entity/LinkableTrait.php @@ -0,0 +1,68 @@ +|Link[] + */ + protected ?Collection $links = null; + + public function __construct() { + $this->links = new ArrayCollection(); + } + + /** + * @return array + */ + public function getLinks() : array { + return $this->links->toArray(); + } + + /** + * @param array|Collection $links + * + * @throws Exception + */ + public function setLinks($links = null) : self { + $this->links = new ArrayCollection(); + if ( ! $links) { + return $this; + } + + foreach ($links as $link) { + $this->addLink($link); + } + + return $this; + } + + /** + * @throws Exception + */ + public function addLink(Link $link) : self { + $link->setEntity($this); + $this->links[] = $link; + + return $this; + } + + public function removeLink(Link $link) : self { + if ($this->links->contains($link)) { + $this->links->removeElement($link); + } + + return $this; + } +} diff --git a/src/Entity/ManuscriptSource.php b/src/Entity/ManuscriptSource.php index f8dc945..d45017c 100644 --- a/src/Entity/ManuscriptSource.php +++ b/src/Entity/ManuscriptSource.php @@ -9,8 +9,8 @@ use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Nines\MediaBundle\Entity\LinkableInterface; -use Nines\MediaBundle\Entity\LinkableTrait; -use Nines\UtilBundle\Entity\AbstractTerm; + + #[ORM\Entity(repositoryClass: ManuscriptSourceRepository::class)] class ManuscriptSource extends AbstractTerm implements LinkableInterface { diff --git a/src/Entity/Monarch.php b/src/Entity/Monarch.php index db320e2..3d2761a 100644 --- a/src/Entity/Monarch.php +++ b/src/Entity/Monarch.php @@ -8,7 +8,7 @@ use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; -use Nines\UtilBundle\Entity\AbstractTerm; + use Symfony\Component\Validator\Constraints as Assert; #[ORM\Entity(repositoryClass: MonarchRepository::class)] diff --git a/src/Entity/Nation.php b/src/Entity/Nation.php index f2720e2..3aa53d8 100644 --- a/src/Entity/Nation.php +++ b/src/Entity/Nation.php @@ -8,7 +8,7 @@ use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; -use Nines\UtilBundle\Entity\AbstractTerm; + #[ORM\Entity(repositoryClass: NationRepository::class)] class Nation extends AbstractTerm { diff --git a/src/Entity/Parish.php b/src/Entity/Parish.php index 43d1b5e..6d1253c 100644 --- a/src/Entity/Parish.php +++ b/src/Entity/Parish.php @@ -9,8 +9,8 @@ use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Nines\MediaBundle\Entity\LinkableInterface; -use Nines\MediaBundle\Entity\LinkableTrait; -use Nines\UtilBundle\Entity\AbstractTerm; + + #[ORM\Entity(repositoryClass: ParishRepository::class)] class Parish extends AbstractTerm implements LinkableInterface { diff --git a/src/Entity/PrintSource.php b/src/Entity/PrintSource.php index 2f24e38..61cdded 100644 --- a/src/Entity/PrintSource.php +++ b/src/Entity/PrintSource.php @@ -9,7 +9,7 @@ use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Nines\MediaBundle\Entity\LinkableInterface; -use Nines\MediaBundle\Entity\LinkableTrait; + use Nines\UtilBundle\Entity\AbstractEntity; #[ORM\Table] diff --git a/src/Entity/Province.php b/src/Entity/Province.php index 4435691..98cce33 100644 --- a/src/Entity/Province.php +++ b/src/Entity/Province.php @@ -9,8 +9,8 @@ use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Nines\MediaBundle\Entity\LinkableInterface; -use Nines\MediaBundle\Entity\LinkableTrait; -use Nines\UtilBundle\Entity\AbstractTerm; + + #[ORM\Entity(repositoryClass: ProvinceRepository::class)] class Province extends AbstractTerm implements LinkableInterface { diff --git a/src/Entity/SourceCategory.php b/src/Entity/SourceCategory.php index ed221c4..a03be81 100644 --- a/src/Entity/SourceCategory.php +++ b/src/Entity/SourceCategory.php @@ -8,7 +8,7 @@ use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; -use Nines\UtilBundle\Entity\AbstractTerm; + #[ORM\Entity(repositoryClass: SourceCategoryRepository::class)] class SourceCategory extends AbstractTerm { diff --git a/src/Entity/Town.php b/src/Entity/Town.php index 3871c00..2e227f5 100644 --- a/src/Entity/Town.php +++ b/src/Entity/Town.php @@ -9,8 +9,8 @@ use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Nines\MediaBundle\Entity\LinkableInterface; -use Nines\MediaBundle\Entity\LinkableTrait; -use Nines\UtilBundle\Entity\AbstractTerm; + + #[ORM\Entity(repositoryClass: TownRepository::class)] class Town extends AbstractTerm implements LinkableInterface { diff --git a/src/Entity/TransactionCategory.php b/src/Entity/TransactionCategory.php index c27a6d4..9090d14 100644 --- a/src/Entity/TransactionCategory.php +++ b/src/Entity/TransactionCategory.php @@ -8,7 +8,7 @@ use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; -use Nines\UtilBundle\Entity\AbstractTerm; + #[ORM\Entity(repositoryClass: TransactionCategoryRepository::class)] class TransactionCategory extends AbstractTerm { diff --git a/src/Form/BookType.php b/src/Form/BookType.php index 8af3884..9447cd3 100644 --- a/src/Form/BookType.php +++ b/src/Form/BookType.php @@ -70,7 +70,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) : void 'help' => 'Imprint as noted on the ESTC', ]); $builder->add('variantImprint', TextareaType::class, [ - 'label' => 'Imprint, Modern English”', + 'label' => 'Imprint, Modern English', 'required' => false, 'help' => 'Original spelling imprint and any variations of it', ]);