Comments (8)
The whole SQL parser needs to be replaced with something more reliable, it's just a case of finding time to do it. Even something as simple as separating SQL statements is just too prone to edge cases.
from ragtime.
@rkneufeld I had similar issues with the parsing of stored procedures... it motivated me to take a different approach and avoid the complexity of parsing sql files... you might take a look at this ( https://github.com/ckuttruff/clj-sql-up ) - which works as you'd expect with more complicated sql syntax
from ragtime.
Out of interest, @ckuttruff, what made you decide to create a migration plugin rather than hook into Ragtime?
from ragtime.
Hey @weavejester
I originally had that intention with this PR ( #18 ), but it seemed like not the best approach given the way things were currently structured with ragtime and the expectation of specifying migrations as sql files. The way of modeling migration statements as a vector of sql strings seemed much simpler (avoiding the necessary parsing logic), but obviously would be a breaking paradigm shift for ragtime.
Apologies if this was perceived as a lack of desire to contribute to ragtime... that is certainly not the case. Given my limited clojure experience, and the need to maintain backwards compatibility, it was much simpler for me to attack the issue from a blank slate
from ragtime.
Ragtime doesn't have an opinion on how migrations are specified. You just need to provide it with a function that returns a sequence of migration maps.
Presumably you wrote clj-sql-up from scratch because you were unaware of that?
from ragtime.
hmm, well I actually wrote clj-sql-up for a variety of reasons; it was a great learning opportunity amongst other things.
But no, I was not aware aware of an alternative method for specifying migration content beyond sql files; was just going off the documentation here: https://github.com/weavejester/ragtime/wiki/Getting-Started#migrations20120903221323-add-test-tableupsql which just specifies creating plain sql files under a migrations directory.
Thanks for the prompt response and sorry if there was more I could have done to contribute to ragtime; just wanted to mention an alternate solution on this issue thread that doesn't run into some of the parsing issues that @rkneufeld and others have encountered in this particular situation.
from ragtime.
No need to apologise! I was just curious as to your reasoning, as that would give me an idea of what could be improved.
The Ragtime README could do a better job at explaining the library, and how different migration strategies could be used.
from ragtime.
Should be fixed by version 0.4.0 redesign.
from ragtime.
Related Issues (20)
- Migration strategy for continuous delivery HOT 3
- Catch and rethrow exceptions during migrations with more context? HOT 1
- Allow migrations to be clojure function instead on just sql HOT 3
- ragtime.strategy/ignore-future doesn't exist in the newest version 0.7.2 HOT 1
- Add clean option to rollback all migrations HOT 4
- Abstract out jdbc project HOT 8
- Read error on wildfly HOT 2
- illegal
- WARNING: An illegal reflective access operation has occurred HOT 3
- get-table-metadata* leaks a ResultSet
- Migration conflict on app restart HOT 2
- Throw more actionable "Conflict" exceptions?
- Upgrade ragtime.jdbc to use next-jdbc HOT 1
- next-jdbc: Discover that the migration table exists even if the name is quoted
- Make a new release with the support for quoted identifiers HOT 2
- No such var: next.jdbc.default-options/wrapped-connection? HOT 11
- Ragtime tries to run same migrations twice on Ubuntu 22.04 HOT 3
- Optimize performance of `ragtime.next-jdbc/ensure-migrations-table-exists` HOT 9
- Consider changing the SQL separator to support MySQL users for the better HOT 2
- Instructions on Concepts wiki page does not match `ragtime 0.8.1` behavior HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ragtime.