Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database is not generated with only sqm files #2094

Closed
mattprecious opened this issue Nov 22, 2020 · 0 comments · Fixed by #2285
Closed

Database is not generated with only sqm files #2094

mattprecious opened this issue Nov 22, 2020 · 0 comments · Fixed by #2285
Labels
Milestone

Comments

@mattprecious
Copy link
Collaborator

mattprecious commented Nov 22, 2020

Build Environment
SQLDelight version: 1.4.4
OS: Mac
Kotlin version: 1.4.1

Describe the bug

Trying to bootstrap a new server project and using the deriveSchemaFromMigrations approach:

sqldelight {
	Database {
		packageName = 'app.thing.db'
		dialect = "postgresql"
		deriveSchemaFromMigrations = true
	}
}

1.sqm:

CREATE TABLE thing (
  id SERIAL PRIMARY KEY,
);

Database is not generated until I add test.sq:

test:
SELECT *
FROM thing;

Not a big deal as I will have real queries shortly, but it's not immediately obvious what the issue is and I assume this decision was made before deriveSchemaFromMigrations was added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants