{"action":"created","issue":{"url":"https://api.github.com/repos/tgriesser/knex/issues/993","labels_url":"https://api.github.com/repos/tgriesser/knex/issues/993/labels{/name}","comments_url":"https://api.github.com/repos/tgriesser/knex/issues/993/comments","events_url":"https://api.github.com/repos/tgriesser/knex/issues/993/events","html_url":"https://github.com/tgriesser/knex/issues/993","id":107836327,"number":993,"title":"migrating from multiple files","user":{"login":"Pomax","id":177243,"avatar_url":"https://avatars.githubusercontent.com/u/177243?v=3","gravatar_id":"","url":"https://api.github.com/users/Pomax","html_url":"https://github.com/Pomax","followers_url":"https://api.github.com/users/Pomax/followers","following_url":"https://api.github.com/users/Pomax/following{/other_user}","gists_url":"https://api.github.com/users/Pomax/gists{/gist_id}","starred_url":"https://api.github.com/users/Pomax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pomax/subscriptions","organizations_url":"https://api.github.com/users/Pomax/orgs","repos_url":"https://api.github.com/users/Pomax/repos","events_url":"https://api.github.com/users/Pomax/events{/privacy}","received_events_url":"https://api.github.com/users/Pomax/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-23T01:54:41Z","updated_at":"2015-09-23T03:54:52Z","closed_at":null,"body":"How do I ensure that knex migrates using multiple files in a reliable order, making sure to finish one file before moving on to the next? #148 suggests this the file processing order is based on file timestamp which would be *insane*, since that makes edits to files in order to fix isues with them (typos, refactors, etc) change the actual migration order. Is there an explicit ordering for files in a migration directory, or a way to specify them? I can't find anything about this in the docs."},"comment":{"url":"https://api.github.com/repos/tgriesser/knex/issues/comments/142484578","html_url":"https://github.com/tgriesser/knex/issues/993#issuecomment-142484578","issue_url":"https://api.github.com/repos/tgriesser/knex/issues/993","id":142484578,"user":{"login":"rhys-vdw","id":822105,"avatar_url":"https://avatars.githubusercontent.com/u/822105?v=3","gravatar_id":"","url":"https://api.github.com/users/rhys-vdw","html_url":"https://github.com/rhys-vdw","followers_url":"https://api.github.com/users/rhys-vdw/followers","following_url":"https://api.github.com/users/rhys-vdw/following{/other_user}","gists_url":"https://api.github.com/users/rhys-vdw/gists{/gist_id}","starred_url":"https://api.github.com/users/rhys-vdw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhys-vdw/subscriptions","organizations_url":"https://api.github.com/users/rhys-vdw/orgs","repos_url":"https://api.github.com/users/rhys-vdw/repos","events_url":"https://api.github.com/users/rhys-vdw/events{/privacy}","received_events_url":"https://api.github.com/users/rhys-vdw/received_events","type":"User","site_admin":false},"created_at":"2015-09-23T03:54:52Z","updated_at":"2015-09-23T03:54:52Z","body":"The files are read in name order, and they are named: `[timestamp]_[migration name]`. So not by the file system's last modified timestamp. Editing files wont change their order unless you rename them (which you ought not do if they've been run)."}}