Giter Club home page Giter Club logo

Comments (8)

lecaillon avatar lecaillon commented on July 28, 2024 2

Addressed by #150

Evolve 2.4.0 will support SQL statements like CREATE DATABASE in special migrations that execute outside of a transaction. To use this feature add this comment in the first line of your migration script: evolve-tx-off.

-- evolve-tx-off
create database evolveshared

from evolve.

lecaillon avatar lecaillon commented on July 28, 2024

Like documented here CREATE DATABASE statement is not supported because of the need to execute it in a separate transaction, which is not supported by Evolve in the same sql file (1 file = 1 big transaction).

I would try to isolate this statement in a separate migration file and execute the next statements in another migration file(s).

Keep me in touch with the results, because I can not test it for now and I'm curious about the results.

Thanks for your feedback :)

from evolve.

adiefrat avatar adiefrat commented on July 28, 2024

Thanks for your quick response!
This is the only statement in the migration I'm running (I have started from a number of statements in one migration and moved to only one).
Also tried not dynamically ('CREATE DATABASE [evolveshared]') and got the same result.

from evolve.

lecaillon avatar lecaillon commented on July 28, 2024

Ok, that's why it is not supported finally ^^ I remember now :) This statement dos not support transaction. And since Evolve always wraps migrations in a transaction, it fails. So while waiting for an evolution of Evolve (which could be possible when the new SqlStatementBuilderBase will be released by the way), use CREATE DATABASE in your scripts is not possible at all. Sorry

from evolve.

adiefrat avatar adiefrat commented on July 28, 2024

OK. Thank you for your time :)

from evolve.

antgel avatar antgel commented on July 28, 2024

@lecaillon When you say "an evolution of Evolve", do you mean that this is something that will be supported at some point? If so, do you have a roadmap for this support? We might be able to support the development on a professional basis.

from evolve.

ahmadtaurus26 avatar ahmadtaurus26 commented on July 28, 2024

Addressed by #150

Evolve 2.4.0 will support SQL statements like CREATE DATABASE in special migrations that execute outside of a transaction. To use this feature add this comment in the first line of your migration script: evolve-tx-off.

-- evolve-tx-off
create database evolveshared

while runnig above script getting an error that [dbname] is not exist. Evolve version is 3.0.0

from evolve.

RobinHiQ avatar RobinHiQ commented on July 28, 2024

Addressed by #150
Evolve 2.4.0 will support SQL statements like CREATE DATABASE in special migrations that execute outside of a transaction. To use this feature add this comment in the first line of your migration script: evolve-tx-off.

-- evolve-tx-off
create database evolveshared

while runnig above script getting an error that [dbname] is not exist. Evolve version is 3.0.0

Did you figure this out? Getting the same issue.

from evolve.

Related Issues (20)

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.