[18:24:20] Regarding discussion in this channel a week ago, I wrote a brain dump for T191231 over the weekend. [18:24:21] T191231: RFC: Abstract schemas and schema changes - https://phabricator.wikimedia.org/T191231 [18:27:32] anomie: Does YAML preserve keys orders like JSON does? [18:28:04] If so, that seems like a good candidate as well, given it's ease of using comments (unlike JSON, which would need non-standard ignoring/stripping of comments) [18:28:49] Krinkle: I don't know. I don't think PHP has a built-in YAML parser though (https://secure.php.net/manual/en/yaml.installation.php says "This PECL extension is not bundled with PHP") [18:29:13] Yeah, we'd use symphony/yaml or some such. It's pretty good. [18:30:24] Krinkle: OTOH, I've included "comment" fields in the data structure itself, because at least MySQL and PG support storing comments on tables, rows, and indexes. [18:31:24] anomie: You mean the -- syntax? Or something that is actually part of the schema once applied? [18:32:45] Hm.. CREATE TABLE .... [COMMENT = ""]; [18:32:47] interesting. [18:32:49] Krinkle: MySQL example: CREATE TABLE foo (foo_id int COMMENT 'Some comment on foo_id') COMMENT 'This is a comment on the table'; [18:33:31] I feel weird about putting the documentation on the db servers itself.. Seems like something that doesn't need to go outside the application layer. [18:33:57] Anyhow, if we want that, then yeah, it'd need to be in the data structure. But I don't imagine us patching schemas for documentation fixes. [21:01:30] Krinkle: while PHP's JSON decoder does preseve order of keys in objects, they're explicitly supposed to be unordered (per http://www.json.org/) [22:23:36] PHP's only does that because it's a FIFO parser and PHP's hybrid array/hashtable structure is ordered [22:24:25] you basically can not make a random ordered hash in PHP. They are always FIFO because the underlying C code makes a linked list of the keys in insert order [22:29:57] tgr: soory to bother you again, but is https://gerrit.wikimedia.org/r/#/c/386329/ fine now? branch cutoff is upon us:)