Fork me on GitHub
#luminus
<
2018-10-23
>
jonpither09:10:37

Wondering if this a good place to ask selmer Qs... is there a way to partition a collection in a template?

jonpither09:10:59

nm, wrote my own filter. Cool!

yogthos14:10:04

and yeah selmer questions are welcome 🙂

credulous20:10:37

Howdy. I’m trying to set up a new luminus app with +mysql. I can’t seem to run the default migration. I get this error:

credulous20:10:07

2018-10-23 14:34:00,206 [main] INFO  migratus.core - Up 20181023140450-add-users-table
2018-10-23 14:34:00,244 [main] DEBUG migratus.migration.sql - found 1 up migrations
2018-10-23 14:34:00,261 [main] ERROR migratus.migration.sql - failed to execute command:
 CREATE TABLE users
(id VARCHAR(20) PRIMARY KEY,
first_name VARCHAR(30),
last_name VARCHAR(30),
email VARCHAR(30),
admin BOOLEAN,
last_login TIMESTAMP,
is_active BOOLEAN,
pass VARCHAR(300));

2018-10-23 14:34:00,261 [main] ERROR migratus.migration.sql - Query was empty
2018-10-23 14:34:00,266 [main] ERROR migratus.database - Migration add-users-table failed because Query was empty backing out
2018-10-23 14:34:00,270 [main] DEBUG migratus.migration.sql - found 1 down migrations
2018-10-23 14:34:00,289 [main] ERROR migratus.migration.sql - failed to execute command:
 DROP TABLE users;

2018-10-23 14:34:00,290 [main] ERROR migratus.migration.sql - Query was empty
2018-10-23 14:34:00,303 [main] DEBUG migratus.database - As expected, one of the statements failed in add-users-table while backing out the migration
java.sql.BatchUpdateException: Query was empty
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_45]

credulous20:10:35

Cutting-and-pasting the SQL into the mysql console creates the table fine.

credulous20:10:14

I think the jdbc URL is correct, because the schema_migrations table is created in the database successfully, and populated with the first row.

credulous21:10:13

I’m using 0.5.7 of luminus-migrate and 1.1.3 of mitratus - I checked that there were no other versions in the .m2 directory just to be safe

credulous21:10:04

Also, the repl doesn’t work… although lein run works fine, when I try lein repl I get this:

credulous21:10:09

$> lein repl
2018-10-23 15:11:26,634 [main] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider
Error loading cider.nrepl.middleware.test: java.lang.RuntimeException: Invalid token: ::clojure.test/once-fixtures, compiling:(cider/nrepl/middleware/test.clj:103:57)
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: cider.nrepl.middleware.test/wrap-test in this context, compiling:(/private/var/folders/rv/16qh1sw961d42htdhlynfzgm0000gn/T/form-init8015114479140815326.clj:1:8421)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7010)

credulous21:10:02

The stack trace has none of my own code in it… in any case I haven’t changed anything except the database URL in dev-config.edn

credulous21:10:30

lein figwheel also works fine

credulous22:10:51

Sorry to fill the channel. I’m probably doing something dreadfully wrong, but it seems like this should work: