Signal-Cartel / EveScoutRescue

Web site and data tools for evescoutrescue.com, maintainer ThriceHappy.
https://evescoutrescue.com/home/
13 stars 10 forks source link

Limiting planets selectable when sowing cache #220

Closed Klensor closed 5 years ago

Klensor commented 5 years ago

Addresses issue #215

Returns right number of options if 'PlanetCount' is available from wh_systems, otherwise the standard default.

I wasn't sure exactly where to put the function - I'm still finding my feet with the php stuff but putting code into the modal_sow file felt a bit untidy, however the systems class is very db focused.

bikerunner commented 5 years ago

Would it be useful to provide an SQL statement to update the table with the new column and set a default value (current max planet number)? So it's possible to set the planet count later? It will be a separate issue otherwise.

Klensor commented 5 years ago

Would it be useful to provide an SQL statement to update the table with the new column and set a default value (current max planet number)? So it's possible to set the planet count later? It will be a separate issue otherwise.

ALTER TABLE wh_systems ADD PlanetCount TINYINT NOT NULL DEFAULT '20' AFTER Notes;

I'll post the SQL with the planet inserts in Discord.

Klensor commented 5 years ago

This is the updated file including the missing entry (total 2603 rows)

UpdatePlanetCounts.zip

bikerunner commented 5 years ago

@Thricehappy This works for me. Tested at local installation.

Update procedure for database:

Thricehappy commented 5 years ago

All changes pushed to production.