feat: Add initial PostgreSQL migration, refactor database connection to k_core, and simplify session store setup.

This commit is contained in:
2026-01-02 05:47:51 +01:00
parent cb73f146c5
commit c1c42f4fd9
8 changed files with 64 additions and 159 deletions

View File

@@ -4,9 +4,21 @@ ignore = [".git", "target", ".idea", ".vscode"]
[placeholders]
project_name = { type = "string", prompt = "Project name" }
database = { type = "string", prompt = "Database type", choices = ["sqlite", "postgres"], default = "sqlite" }
database = { type = "string", prompt = "Database type", choices = [
"sqlite",
"postgres",
], default = "sqlite" }
[hooks]
post = ["migrations.rhai"]
[conditional]
# Conditional dependencies based on database choice
sqlite = { condition = "database == 'sqlite'", ignore = ["template-infra/src/user_repository_postgres.rs"] }
postgres = { condition = "database == 'postgres'", ignore = ["template-infra/src/user_repository_sqlite.rs"] }
sqlite = { condition = "database == 'sqlite'", ignore = [
"template-infra/src/user_repository_postgres.rs",
"migrations_postgres",
] }
postgres = { condition = "database == 'postgres'", ignore = [
"template-infra/src/user_repository_sqlite.rs",
"migrations",
] }