luminus

jonpither 2018-10-23T09:21:37.000100Z

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

jonpither 2018-10-23T09:55:59.000100Z

nm, wrote my own filter. Cool!

yogthos 2018-10-23T14:40:41.000200Z

👍

yogthos 2018-10-23T14:41:04.000200Z

and yeah selmer questions are welcome 🙂

2018-10-23T20:35:37.000100Z

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:

2018-10-23T20:36:07.000100Z

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]

2018-10-23T20:36:35.000200Z

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

2018-10-23T20:37:14.000100Z

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

2018-10-23T21:06:13.000200Z

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

2018-10-23T21:15:04.000200Z

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

2018-10-23T21:15:09.000100Z

$> 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)

2018-10-23T21:16:02.000100Z

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

2018-10-23T21:16:30.000100Z

lein figwheel also works fine

2018-10-23T22:14:51.000100Z

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