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

Relational database support #30

Open
jyecusch opened this issue Jan 10, 2024 · 4 comments
Open

Relational database support #30

jyecusch opened this issue Jan 10, 2024 · 4 comments
Labels
core Changes to the Nitric gRPC server or contracts preview Released as a preview feature

Comments

@jyecusch
Copy link
Member

jyecusch commented Jan 10, 2024

Support deployment of Relational SQL databases in Nitric apps. Initial support will focus on Postgres databases.

@jyecusch jyecusch added this to Roadmap Jan 10, 2024
@jyecusch jyecusch converted this from a draft issue Jan 10, 2024
@jyecusch jyecusch added the core Changes to the Nitric gRPC server or contracts label Jan 10, 2024
@jyecusch jyecusch moved this from Q1 2024 Jan-Mar to Q2 2024 Apr-Jun in Roadmap Jan 16, 2024
@chimon2000
Copy link

Would this integration also have a mechanism for migrations?

@tjholm
Copy link
Member

tjholm commented May 21, 2024

Current preview implementation for AWS available at: nitrictech/nitric#613

@chimon2000 This does include a migration mechanism at the moment. This comes in two flavors.

  1. Simple migrations directory, this can be specified as part of your IfC database definition:
import { sql } from "@nitric/sdk";

const myDatabase = sql("my-db", {
  // Use a migrations folder relative to the nitric.yaml
  migrations: "file:///migrations/"
});
  1. Custom dockerfile, this will allow the use of existing migration tooling, that may come as part of an existing ORM that is being used (e.g. Prisma/Drizzle etc)
import { sql } from "@nitric/sdk";

const myDatabase = sql("my-db", {
  // Use a dockerfile relative to the nitric.yaml
  migrations: "dockerfile:///migrations.dockerfile"
});

@chimon2000
Copy link

migrations

In the case of Option 1, how would Nitric use the migrations folder?

@tjholm
Copy link
Member

tjholm commented Jun 11, 2024

@chimon2000 apologies for the late reply. The migrations folder uses https://github.com/golang-migrate/migrate by default in our preview release, we'll build a default migration image in the case where a migrations directory is given using that tool.

@jyecusch jyecusch added the preview Released as a preview feature label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Changes to the Nitric gRPC server or contracts preview Released as a preview feature
Projects
Status: Q2 2024 Apr-Jun
Development

No branches or pull requests

3 participants