I'm runnning a selfhosted image of Metabase ("Image": "metabase/metabase:latest" as found in the docker inspect command) connected to my postgres db.
When trying to start Metabase the startup fails with this error:
Caused by: clojure.lang.ExceptionInfo: ERROR: column "createdat" does not exist
Hint: Perhaps you meant to reference the column "topics.createdAt".
Position: 84 {:toucan2/context-trace [["execute SQL with class com.mchange.v2.c3p0.impl.NewProxyConnection" {:toucan2.jdbc.query/sql-args ["ALTER TABLE \"topics\" ALTER COLUMN \"createdat\" TYPE TIMESTAMP WITH TIME ZONE USING (\"createdat\"::TIMESTAMP WITH TIME ZONE), ALTER COLUMN createdat SET NOT NULL"]}] ["resolve connection" {:toucan2.connection/connectable org.postgresql.jdbc.PgConnection}] ["resolve connection" {:toucan2.connection/connectable nil}] {:toucan2.pipeline/rf #object[clojure.core$map$fn__5931$fn__5932 0x3ae00668 "clojure.core$map$fn__5931$fn__5932@3ae00668"]} ["with compiled query" {:toucan2.pipeline/compiled-query ["ALTER TABLE \"topics\" ALTER COLUMN \"createdat\" TYPE TIMESTAMP WITH TIME ZONE USING (\"createdat\"::TIMESTAMP WITH TIME ZONE), ALTER COLUMN createdat SET NOT NULL"]}] ["with built query" {:toucan2.pipeline/built-query ["ALTER TABLE \"topics\" ALTER COLUMN \"createdat\" TYPE TIMESTAMP WITH TIME ZONE USING (\"createdat\"::TIMESTAMP WITH TIME ZONE), ALTER COLUMN createdat SET NOT NULL"]}] ["with resolved query" {:toucan2.pipeline/resolved-query ["ALTER TABLE \"topics\" ALTER COLUMN \"createdat\" TYPE TIMESTAMP WITH TIME ZONE USING (\"createdat\"::TIMESTAMP WITH TIME ZONE), ALTER COLUMN createdat SET NOT NULL"]}] ["with parsed args" {:toucan2.pipeline/query-type :toucan.result-type/*, :toucan2.pipeline/parsed-args {:connectable nil, :queryable ["ALTER TABLE \"topics\" ALTER COLUMN \"createdat\" TYPE TIMESTAMP WITH TIME ZONE USING (\"createdat\"::TIMESTAMP WITH TIME ZONE), ALTER COLUMN createdat SET NOT NULL"]}}] ["with model" {:toucan2.pipeline/model nil}] ["resolve connection" {:toucan2.connection/connectable org.postgresql.jdbc.PgConnection}] ["resolve connection" {:toucan2.connection/connectable nil}]]}
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2725)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2412)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:371)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:502)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:419)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:194)
at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:180)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:67)
at toucan2.jdbc.query$reduce_jdbc_query.invokeStatic(query.clj:40)
at toucan2.jdbc.query$reduce_jdbc_query.invoke(query.clj:22)
at toucan2.jdbc.pipeline$transduce_execute_with_connection_primary_method_java_sql_Connection_default_default.invokeStatic(pipeline.clj:19)
at toucan2.jdbc.pipeline$transduce_execute_with_connection_primary_method_java_sql_Connection_default_default.invoke(pipeline.clj:9)
at methodical.impl.combo.common$partial_STAR_$fn__18182.invoke(common.clj:15)
at methodical.impl.combo.threaded$combine_methods_thread_last$fn__18492$combined_method_thread_last__18493.invoke(threaded.clj:64)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:65)
at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:216)
at toucan2.pipeline$transduce_execute$with_connection_STAR___21600.invoke(pipeline.clj:78)
at toucan2.connection$bind_current_connectable_fn$fn__21277.invoke(connection.clj:104)
at toucan2.connection$bind_current_connectable_fn$fn__21277.invoke(connection.clj:104)
at toucan2.jdbc.connection$do_with_connection_primary_method_java_sql_Connection.invokeStatic(connection.clj:13)
at toucan2.jdbc.connection$do_with_connection_primary_method_java_sql_Connection.invoke(connection.clj:11)
at methodical.impl.combo.common$partial_STAR_$fn__18182.invoke(common.clj:12)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
at methodical.impl.combo.common$partial_STAR_$fn__18182.invoke(common.clj:12)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
at toucan2.connection$do_with_connection_primary_method_.invokeStatic(connection.clj:204)
at toucan2.connection$do_with_connection_primary_method_.invoke(connection.clj:194)
at methodical.impl.combo.common$partial_STAR_$fn__18182.invoke(common.clj:12)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
at methodical.impl.combo.common$partial_STAR_$fn__18182.invoke(common.clj:12)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
at toucan2.pipeline$transduce_execute.invokeStatic(pipeline.clj:77)
at toucan2.pipeline$transduce_execute.invoke(pipeline.clj:64)
at clojure.lang.Var.invoke(Var.java:399)
at toucan2.pipeline$transduce_compiled_query.invokeStatic(pipeline.clj:244)
at toucan2.pipeline$transduce_compiled_query.invoke(pipeline.clj:240)
at toucan2.pipeline$transduce_built_query.invokeStatic(pipeline.clj:252)
at toucan2.pipeline$transduce_built_query.invoke(pipeline.clj:246)
at toucan2.pipeline$transduce_query_primary_method_default.invokeStatic(pipeline.clj:272)
at toucan2.pipeline$transduce_query_primary_method_default.invoke(pipeline.clj:269)
at methodical.impl.combo.common$partial_STAR_$fn__18182.invoke(common.clj:15)
at methodical.impl.combo.threaded$combine_methods_thread_last$fn__18492$combined_method_thread_last__18493.invoke(threaded.clj:64)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:65)
at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:216)
at toucan2.pipeline$transduce_query_STAR_.invokeStatic(pipeline.clj:278)
at toucan2.pipeline$transduce_query_STAR_.invoke(pipeline.clj:274)
at toucan2.pipeline$transduce_with_model.invokeStatic(pipeline.clj:293)
at toucan2.pipeline$transduce_with_model.invoke(pipeline.clj:280)
at toucan2.pipeline$transduce_parsed.invokeStatic(pipeline.clj:309)
at toucan2.pipeline$transduce_parsed.invoke(pipeline.clj:295)
at toucan2.execute$fn__21716.invokeStatic(execute.clj:79)
at toucan2.execute$fn__21716.invoke(execute.clj:77)
at toucan2.execute$query_STAR_$query_STAR__STAR___21713.invoke(execute.clj:39)
at toucan2.execute$query_STAR_$query_STAR__STAR___21713.invoke(execute.clj:33)
at toucan2.execute$query_STAR_$query_STAR__STAR___21713.invoke(execute.clj:28)
at toucan2.execute$query_STAR_$query_STAR__STAR___21713.invoke(execute.clj:25)
at metabase.db.custom_migrations$unify_time_column_type_BANG_.invokeStatic(custom_migrations.clj:1026)
at metabase.db.custom_migrations$unify_time_column_type_BANG_.invoke(custom_migrations.clj:1006)
at metabase.db.custom_migrations.UnifyTimeColumnsType$with_connection_STAR___43810$with_transaction_STAR___43811.invoke(custom_migrations.clj:1031)
at toucan2.connection$bind_current_connectable_fn$fn__21277.invoke(connection.clj:104)
at metabase.db.connection$do_transaction$thunk__42418.invoke(connection.clj:140)
at metabase.db.connection$do_transaction.invokeStatic(connection.clj:155)
at metabase.db.connection$do_transaction.invoke(connection.clj:136)
at metabase.db.connection$do_with_transaction_primary_method_java_sql_Connection.invokeStatic(connection.clj:189)
at metabase.db.connection$do_with_transaction_primary_method_java_sql_Connection.invoke(connection.clj:162)
at methodical.impl.combo.common$partial_STAR_$fn__18182.invoke(common.clj:13)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at toucan2.connection$do_with_transaction_around_method_toucan2_connection_default.invokeStatic(connection.clj:249)
at toucan2.connection$do_with_transaction_around_method_toucan2_connection_default.invoke(connection.clj:245)
at methodical.impl.combo.common$partial_STAR_$fn__18182.invoke(common.clj:13)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:58)
at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:212)
at metabase.db.custom_migrations.UnifyTimeColumnsType$with_connection_STAR___43810.invoke(custom_migrations.clj:1030)
at toucan2.connection$bind_current_connectable_fn$fn__21277.invoke(connection.clj:104)
at toucan2.connection$bind_current_connectable_fn$fn__21277.invoke(connection.clj:104)
at toucan2.jdbc.connection$do_with_connection_primary_method_java_sql_Connection.invokeStatic(connection.clj:13)
at toucan2.jdbc.connection$do_with_connection_primary_method_java_sql_Connection.invoke(connection.clj:11)
at methodical.impl.combo.common$partial_STAR_$fn__18182.invoke(common.clj:12)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
at methodical.impl.combo.common$partial_STAR_$fn__18182.invoke(common.clj:12)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
at toucan2.connection$do_with_connection_primary_method_.invokeStatic(connection.clj:204)
at toucan2.connection$do_with_connection_primary_method_.invoke(connection.clj:194)
at methodical.impl.combo.common$partial_STAR_$fn__18182.invoke(common.clj:12)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
at methodical.impl.combo.common$partial_STAR_$fn__18182.invoke(common.clj:12)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
at metabase.db.custom_migrations.UnifyTimeColumnsType.execute(custom_migrations.clj:1030)
at liquibase.change.custom.CustomChangeWrapper.generateStatements(CustomChangeWrapper.java:170)
at liquibase.executor.AbstractExecutor.execute(AbstractExecutor.java:133)
at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1285)
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:755)
... 81 more
Caused by: org.postgresql.util.PSQLException: ERROR: column "createdat" does not exist
Hint: Perhaps you meant to reference the column "topics.createdAt".
TLDR; Seems like Liquidbase expects "createdat" column but the actual name is "createdAt" and it crashes.
All my tables use createdAt as name capitalization for that column so I'd like to avoid changing the column name and all my interfaces just to make this work. Is there any other option? I can't find any script or file where I could change what column names are expected.
Thanks for your help.