Coder Social home page Coder Social logo

dbmigrations-mysql's People

Contributors

basti1302 avatar jtdaugherty avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

viviag

dbmigrations-mysql's Issues

Failing test, possible problem with executing multiple statements

The test applyMigrationSuccess fails with the following error:

Error in: 0:MySQL backend tests

ConnectionError {errFunction = "query", errNumber = 1064, errMessage = "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE TABLE valid2 (a int)' at line 1"}
Cases: 1 Tried: 1 Errors: 1 Failures: 0

At first I though that maybe the way the applyMigration function is implemented is not capable of executing a migration that contains multiple statements (separated by a semicolon) because the test passes if one removes the second "CREATE TABLE" statement (and the corresponding expectation from the check for installed tables) from the migration that is constructed in this test. This can't be the whole truth, though, because having multiple statements in one migration works fine when using moo-mysql. I did not investigate further.

Another aspect that is maybe worth noting: I suspect this test never actually ran successfully, because the way BackendTest.hs is implemented it stops on the first test failure without even attempting the to run the rest of the tests. applyMigrationFailure always failed, so most of the tests probably never ran at all. This is backed up by the fact that revertMigrationFailure and revertMigrationNothing also failed once the other test failures were removed. Those failed with

### Error in:   0:MySQL backend tests
QueryError {qeMessage = "execute resulted in 1-column result", qeQuery = "SELECT 1"}
Cases: 1  Tried: 1  Errors: 1  Failures: 0

because apparently the SELECT 1 or similar that were meant to act as a noop caused a problem with a result that was left unconsumed, see commit 3cdb029c5ad09517b199a2ede5a956fc76426da3
for a proper MySQL noop.

(In retrospect, it might have been a good idea to remove the known failing test case right from the start).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.