Comments (3)
A useful work-around for PostgreSQL 9+ appears to be:
DO $$
BEGIN
PERFORM my_function();
END$$;
from migratus.
I think that's probably the way you would have to do it. Migratus is calling the clojure.java.jdbc do-commands
function, so it isn't expecting a result set to be returned.
from migratus.
JDBC borks on double dollar ($$
)-quoted strings, so Java users may want to use single quotes ('
) instead, e.g.:
-- work around JDBC 'A result was returned when none was expected.'
DO '
BEGIN
-- fix broken nextval due to poorly written 20140320100000_CreateAdminUserRoleTables.sql
PERFORM setval(''admin_user_role_groups_id_seq'', 1 + COALESCE(MAX(id), 0), FALSE) FROM admin_user_role_groups;
END; ';
from migratus.
Related Issues (20)
- No method in multimethod 'make-store' for dispatch value: null when passing a hikari connection pool HOT 2
- When error happens, db password information is shown HOT 5
- next.jdbc does not support :connection-uri style :db (yet) HOT 4
- How to know current db tables state/fields? HOT 8
- Paths with "+" characters result in NoSuchFileException HOT 2
- Custom args to migration functions HOT 3
- Sanitation of migration-table-name breaks existing migrations HOT 2
- Tests failing
- Return new file name from migratus/create instead of nil HOT 6
- [BUG] up / down don't appear to be working with code-based migrations HOT 4
- Add option to list ALL migrations considered by migratus HOT 13
- Table name should be keyword for next.jdbc HOT 2
- Option to ignore regex pattern warning HOT 6
- Allow for future migrations that are not run until the timestamp on the migration has passed HOT 10
- Migratus rollback doesn't bring down the last migration, but the first migration. HOT 5
- Using `:disable-transaction` and passing in a `Connection` object throws error HOT 8
- Allow managing the connection state from calling code HOT 2
- Suggestion: print a warning if a command might contain multiple statements HOT 1
- exclude-scripts behaviour
- Unable to run migrations when `next.jdbc.transaction/*nested-tx*` is set to `:prohibit` HOT 3
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 migratus.