Page MenuHomePhabricator

Update.php fails with postgres due to ip_changes population
Closed, ResolvedPublic3 Estimated Story Points

Description

Running update.php I get "Error: 42P01 ERROR: relation "ip_changes" does not exist"

I don't see a /postgres patch for that table.

We should also make sure the code fails gracefully if the table doesn't exist.

Event Timeline

Reedy added subscribers: MusikAnimal, Reedy.

From T163562, CC @MusikAnimal

We should probably make the populateIpChanges.php script fail more gracefully if the table doesn't exist (as a safeguard).

But a patch for postgres should probably be made

This should go out with MW 1.30. I can make the script fail gracefully, but I do not have a lot of experience with Postgres and am not sure what the schema should look like.

This should go out with MW 1.30. I can make the script fail gracefully, but I do not have a lot of experience with Postgres and am not sure what the schema should look like.

Wanna make the patch for master to do this safeguard, and we'll get it backported as a minimum?

As for making a pg db patch... Look at the mysql schema, see what tables already in core have the same/similar type, and match the column in the pg schema file to make something similar :)

Sure, I'll get a patch out soon! Going to add this to our sprint

kaldari set the point value for this task to 3.

Change 391058 had a related patch set uploaded (by MusikAnimal; owner: MusikAnimal):
[mediawiki/core@master] Add SQL for postgres, and fail gracefully in populateIpChanges

https://gerrit.wikimedia.org/r/391058

Change 392673 had a related patch set uploaded (by Reedy; owner: MusikAnimal):
[mediawiki/core@REL1_30] Add SQL for postgres, and fail gracefully in populateIpChanges

https://gerrit.wikimedia.org/r/392673

Change 392673 merged by jenkins-bot:
[mediawiki/core@REL1_30] Add SQL for postgres, and fail gracefully in populateIpChanges

https://gerrit.wikimedia.org/r/392673

Change 391058 merged by jenkins-bot:
[mediawiki/core@master] Add SQL for postgres, and fail gracefully in populateIpChanges

https://gerrit.wikimedia.org/r/391058

Reedy assigned this task to MusikAnimal.
Reedy removed a project: Patch-For-Review.

Change 394145 had a related patch set uploaded (by Reedy; owner: Reedy):
[mediawiki/core@master] Add ip_changes to postgres/tables.sql

https://gerrit.wikimedia.org/r/394145

Change 394154 had a related patch set uploaded (by Reedy; owner: Reedy):
[mediawiki/core@REL1_30] Add ip_changes to postgres/tables.sql

https://gerrit.wikimedia.org/r/394154

Change 394145 merged by jenkins-bot:
[mediawiki/core@master] Add ip_changes to postgres/tables.sql

https://gerrit.wikimedia.org/r/394145

Change 394154 merged by jenkins-bot:
[mediawiki/core@REL1_30] Add ip_changes to postgres/tables.sql

https://gerrit.wikimedia.org/r/394154