You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm setting up a sqitch project where I want to include the initial schema creation among the migration files:
deploy/schemas/appschema.sql
-- Deploy app:schemas/appschema to mysqlbegin;
CREATEDATABASEIF NOT EXISTS appschema;
COMMIT;
I therefore have a sqitch.conf with
[target "dev"]
uri = db:mysql://root:[email protected]:3306/
registry = appschema_sqitch
However, this causes sqitch deploy to fail on a clean database setup (mysql container):
$ sqitch deploy
warning: Database name missing in URI "db:mysql://root:[email protected]:3306/""appschema_sqitch" failed to start: "No such file or directory
Expected behavior
URIs without a target database should be accepted. It should be up to the user to qualify their statements or call e.g. USE appschema in scripts in such cases.
Sqitch: v1.4.1
OS: Debian 11 (running in devcontainer under Ubuntu 20.04.6 LTS (focal) (64-bit) on Docker version 25.0.4, build 1a576c5)
Database: MySql 8.0.32
The text was updated successfully, but these errors were encountered:
My current workaround is to target information_schema but that does come with risks, such as accidentally creating tables where they're not supposed to be.
@theory in mysql CREATE DATABASE is synonymous with CREATE SCHEMA. Is there a reason for not supporting this/projects that make use of multiple schemas? What is the motivation behind requiring a schema to be specified?
I'm setting up a sqitch project where I want to include the initial schema creation among the migration files:
deploy/schemas/appschema.sql
I therefore have a
sqitch.conf
withHowever, this causes
sqitch deploy
to fail on a clean database setup (mysql container):Expected behavior
URIs without a target database should be accepted. It should be up to the user to qualify their statements or call e.g.
USE appschema
in scripts in such cases.Sqitch: v1.4.1
OS: Debian 11 (running in devcontainer under Ubuntu 20.04.6 LTS (focal) (64-bit) on Docker version 25.0.4, build 1a576c5)
Database: MySql 8.0.32
The text was updated successfully, but these errors were encountered: