Closed Klensor closed 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.
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.
This is the updated file including the missing entry (total 2603 rows)
@Thricehappy This works for me. Tested at local installation.
Update procedure for database:
All changes pushed to production.
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.