* Let database.Open() use schemeFromURL as well
Otherwise it will fail on MySQL DSNs.
Moved schemeFromURL into the database package. Also removed databaseSchemeFromURL
and sourceSchemeFromURL as they were just calling schemeFromURL.
Fixes https://github.com/golang-migrate/migrate/pull/265#issuecomment-522301237
* Moved url functions into internal/url
Also merged the test cases.
* Add some database tests to improve coverage
* Fix suggestions
* Fix in the URL parser with go 1.12.8 and github.com/go-sql-driver/mysql
Change schemeFromURL to just split the url by :// to find the scheme.
It's not required to parse the whole URL. MySQL DSNs aren't valid URLs.
Fixes#264
* The mysql driver itself also used net/url.Parse
* Also fix TestPasswordUnencodedReservedURLChars
* Keep backwards compatibility with url encoded username and passwords
* Fix suggestions
* Reuse old function names
* Disable FOREIGN_KEY_CHECKS in MySQL when dropping all tables.
* Lowercased system variable
* Discard error enabling foreign_key_checks, dropping is already successful at this point
* Explicitly discard error
- Only compile a regex once for re-use
- Don't use regex unnecessarily (removing trailing semicolon)
- Add test for parsing multiple statements in a migration
* Added Firebird support
* Fixed typo
* Refactoring
* Schema migrations table name don't have to be upper case
* Fixed readme
* Added Firebird 2.5 support
* Removed SchemaName
* Refactoring
* Consistently lock in ensureVersionTable and do not call ensureVersionTable from Drop across all database implementations
* Add test for dropping postgres databases
* Fix failing database tests
* Fix CockroachDb test, lock table should be created before versionTable
* Add Initialize() to Driver interface, and add integration tests for Drop() between database implementations and migrate
* Remove Initialize, document breaking behaviour of Drop
* Revert introduction of Initialize method
* Removed Initialize in Stub as well
* Remove call to non-existent Initialize and make sure to close re-initialized database connections
* Revert changes to TestDrop in database/testing
* Split Test and TestMigrate into different test entrypoints
* Remove unused import in migrate_testing
* Remove erroneous code to fix tests
* Add stub source imports to database tests
* Add Stub source to migrate tests
* Use example migrations for tests
* Add file driver to database tests
* Align database directory layout
* Add file source driver to Cassandra
* Review changes
* Minor syntactic change for cleaner diff