From 389eea93a420438b35d98f0f3f6c1745e0271c7e Mon Sep 17 00:00:00 2001 From: Nicolas Melo Date: Mon, 18 Nov 2024 13:33:39 -0300 Subject: [PATCH 1/2] fix drizzle template --- .../databases/templates/app/drizzle/README.md | 38 ++++++++++++++++--- .../templates/app/drizzle/tsconfig.json | 5 ++- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/packages/databases/templates/app/drizzle/README.md b/packages/databases/templates/app/drizzle/README.md index e278da62..e3197179 100644 --- a/packages/databases/templates/app/drizzle/README.md +++ b/packages/databases/templates/app/drizzle/README.md @@ -1,15 +1,41 @@ -# @palmares/drizzle-template +# The amazing ${appName} -To install dependencies: +This project was created using [@palmares/databases](https://www.npmjs.com/package/@palmares/databases) [Drizzle's](https://orm.drizzle.team/) template. + +## Getting started + +1. Install the dependencies: + +```bash +$ ${packageManager} install +``` + +2. Run the migrations + +```bash +$ ${packageManager} run migrate +``` + +3. Run the application + +```bash +$ ${packageManager} run dev +``` + +## Migrations + +- Generate the migrations by running ```bash -bun install +$ ${packageManager} run makemigrations ``` -To run: +- Run the migrations by running ```bash -bun run index.ts +$ ${packageManger} run migrate ``` -This project was created using `bun init` in bun v1.1.33. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. +## Learn More + +To learn more reach out to [@palmares/databases](https://www.npmjs.com/package/@palmares/databases), you can see more links on the bottom of the page diff --git a/packages/databases/templates/app/drizzle/tsconfig.json b/packages/databases/templates/app/drizzle/tsconfig.json index 2a9297bb..95cb2b39 100644 --- a/packages/databases/templates/app/drizzle/tsconfig.json +++ b/packages/databases/templates/app/drizzle/tsconfig.json @@ -1,7 +1,8 @@ { "compilerOptions": { - "target": "es5", - "module": "commonjs", + "target": "ES6", + "module": "ES2015", + "moduleResolution": "bundler", "lib": ["es6"], "allowJs": true, "outDir": "dist", From 5d0081e97bf035648530b7a9e81dd5cf42a71622 Mon Sep 17 00:00:00 2001 From: Nicolas Melo Date: Mon, 18 Nov 2024 13:34:25 -0300 Subject: [PATCH 2/2] add changeset --- .changeset/red-days-itch.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changeset/red-days-itch.md diff --git a/.changeset/red-days-itch.md b/.changeset/red-days-itch.md new file mode 100644 index 00000000..826ca8aa --- /dev/null +++ b/.changeset/red-days-itch.md @@ -0,0 +1,7 @@ +--- +'@palmares/databases': patch +'palmares': patch +'@palmares/drizzle-engine': patch +--- + +Fix drizzle template to run flawlessly