Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDLS-402 - Migrate existing data from dd_user table to deputy table #1775

Merged
merged 9 commits into from
Jan 7, 2025
Prev Previous commit
Next Next commit
DDLS-402 - Changes script due to no longer changing deputy_uid to big…
…int in deputy table
  • Loading branch information
Raffers committed Dec 17, 2024
commit 589b22053fb5bc4b1888baa37fc7df3ca3527798
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version287 extends AbstractMigration
final class Version286 extends AbstractMigration
{
public function getDescription(): string
{
Expand All @@ -24,7 +24,7 @@ public function up(Schema $schema): void
INSERT INTO deputy
(user_id, deputy_uid, firstname, lastname, email1, address1, address2,
address3, address4, address5, address_postcode, address_country, phone_main, phone_alternative)
SELECT id, deputy_uid, firstname, lastname, email, address1, address2, address3,
SELECT id, CAST(deputy_uid AS VARCHAR), firstname, lastname, email, address1, address2, address3,
address4, address5, address_postcode, address_country, phone_main, phone_alternative
FROM dd_user
WHERE id IN (
Expand All @@ -36,7 +36,7 @@ public function up(Schema $schema): void
SELECT id
FROM dd_user
WHERE is_primary = TRUE
AND deputy_uid NOT IN (
AND CAST(deputy_uid AS VARCHAR) NOT IN (
SELECT deputy_uid
FROM deputy
)
Expand Down
Loading