[19:10:27] [[Tech]]; Maxyaffe; /* New Wiki user/admin advice */ new section; https://meta.wikimedia.org/w/index.php?diff=24214530&oldid=24194297&rcid=25727760 [21:53:53] How do you use the abstract schema changes generator when you are generating the SQL files for making a new table? [21:58:15] Create a JSON file then just run GenerateSchemaSql rather than GenerateSchemaChangeSql? [21:59:09] Hmm. Unsure, because in following https://www.mediawiki.org/wiki/Manual:Schema_changes it says to run both scripts [21:59:28] But for different purposes [21:59:50] If I'm not misunderstanding what GenerateSchemaSql does, is it just creates tables-generated.sql [22:00:47] https://www.mediawiki.org/wiki/Manual:Schema_changes#Automatically_generated [22:01:21] That looks like when you want to change a MW core table, so you want to update table-generated (for new installs) *and* create a patch for the update for other existing wikis [22:01:35] Yes. [22:02:00] Also, when I've tried to run GenerateSchemaSql using the abstractSchemaChanges file I created it fails with the error "[before.columns] There must be a minimum of 1 items in the array" [22:02:17] Adding columns to that array doesn't make much sense as the table doesn't yet exist [22:02:46] You probably don't want to do an abstract schema change if you're creating a new table [22:02:55] create a json file for the table, run the scripts over it [22:03:31] create the new sql files to create it, plumb those in [22:04:14] Sure. So like copy the relevant "CREATE TABLE" from tables-generated.sql into a new SQL file for each of the DB types [22:04:24] I'll do that. Thanks. [22:05:00] Yeah. I think the process probably isn't well optimised for adding new tables