{"action":"created","issue":{"url":"https://api.github.com/repos/textpattern/textpattern/issues/568","labels_url":"https://api.github.com/repos/textpattern/textpattern/issues/568/labels{/name}","comments_url":"https://api.github.com/repos/textpattern/textpattern/issues/568/comments","events_url":"https://api.github.com/repos/textpattern/textpattern/issues/568/events","html_url":"https://github.com/textpattern/textpattern/pull/568","id":113690055,"number":568,"title":"SQL: installation / update scripts","user":{"login":"vanmelick","id":10106358,"avatar_url":"https://avatars.githubusercontent.com/u/10106358?v=3","gravatar_id":"","url":"https://api.github.com/users/vanmelick","html_url":"https://github.com/vanmelick","followers_url":"https://api.github.com/users/vanmelick/followers","following_url":"https://api.github.com/users/vanmelick/following{/other_user}","gists_url":"https://api.github.com/users/vanmelick/gists{/gist_id}","starred_url":"https://api.github.com/users/vanmelick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanmelick/subscriptions","organizations_url":"https://api.github.com/users/vanmelick/orgs","repos_url":"https://api.github.com/users/vanmelick/repos","events_url":"https://api.github.com/users/vanmelick/events{/privacy}","received_events_url":"https://api.github.com/users/vanmelick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-10-27T21:10:38Z","updated_at":"2015-10-29T20:14:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/textpattern/textpattern/pulls/568","html_url":"https://github.com/textpattern/textpattern/pull/568","diff_url":"https://github.com/textpattern/textpattern/pull/568.diff","patch_url":"https://github.com/textpattern/textpattern/pull/568.patch"},"body":"This is a big one. Changes:\r\n* Consistent layout of SQL queries, with upper case keywords, no backticks unless needed, etc. It should be a lot easier to read the setup / update files now, especially txpsql.php\r\n* setup/txpsql.php can now handle the entire installation part of the database, without having to run update scripts after the first login.\r\n* All the big chunks of text like style sheets, forms and the initial article are now stored in separate external files, which are much easier to edit (and greatly reduces the size of txpsql.php)\r\n* Moved SQL queries from setup/index.php to setup/txpsql.php (which is a more appropriate place)\r\n* Use of built in functions where possible to reduce the amount of code needed during updates.\r\n* If SQL errors happen during installation, show usable debug info which includes the actual queries that caused the errors (in a nice style now as well).\r\n* Remove several things during installation that weren't needed, like display widths on table columns (confusing, really), auto_increment values (those are set automatically), and pack_keys (which MySQL knows how to set better than we do).\r\n* Found a few inconsistencies due to changes in txpsql that were never part of update scripts, causing differences between TXP versions, even if updated to the same version. Fixed.\r\n* Found and fixed a few small bugs in the update scripts.\r\n* The _to_4.5.7 file wasn't called during updates.\r\n* Avoid the missing table error (due to the removal of the ipban table) when using SVN after login.\r\n\r\nWhat I've tested:\r\n* update from 4.0.3, 4.2.0, 4.3.0. Table structures match those of 4.6.0.\r\n* compared the \"old\" 4.6 branch with this new one. Table structures match.\r\n* compared prefs table from 4.0.3 (updated), 4.6 (old) and 4.6 (this one). They match (minor differences, but those are intentional)\r\n\r\nThis partially fixes issue #567 (see that issue for more details).\r\n"},"comment":{"url":"https://api.github.com/repos/textpattern/textpattern/issues/comments/152305417","html_url":"https://github.com/textpattern/textpattern/pull/568#issuecomment-152305417","issue_url":"https://api.github.com/repos/textpattern/textpattern/issues/568","id":152305417,"user":{"login":"vanmelick","id":10106358,"avatar_url":"https://avatars.githubusercontent.com/u/10106358?v=3","gravatar_id":"","url":"https://api.github.com/users/vanmelick","html_url":"https://github.com/vanmelick","followers_url":"https://api.github.com/users/vanmelick/followers","following_url":"https://api.github.com/users/vanmelick/following{/other_user}","gists_url":"https://api.github.com/users/vanmelick/gists{/gist_id}","starred_url":"https://api.github.com/users/vanmelick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanmelick/subscriptions","organizations_url":"https://api.github.com/users/vanmelick/orgs","repos_url":"https://api.github.com/users/vanmelick/repos","events_url":"https://api.github.com/users/vanmelick/events{/privacy}","received_events_url":"https://api.github.com/users/vanmelick/received_events","type":"User","site_admin":false},"created_at":"2015-10-29T20:14:19Z","updated_at":"2015-10-29T20:14:19Z","body":"Those were my final changes to the update/install scripts.\r\nOnce those are applied, I'll send a pull request for changes to the files outside /setup and /update to get some more consistency in SQL queries there as well. I have those ready to go as well in the same branch, just not committed yet."}}