postgres

Error: P1003 : Prisma Migrate could not create the shadow database.

Error: P1003 : Prisma Migrate could not create the shadow database.

Fix your Prisma Migration error: 1. Update your .env config . DATABASE_URL="postgresql://postgres:asdf4321@127.0.0.1:5432/postgres" SHADOW_DATABASE_URL="postgresql://postgres:asdf4321@127.0.0.1:5432/postgres" Enter fullscreen mode Exit fullscreen mode 2. Update schema.prisma file. generator client { provider = "prisma-client-js" } datasource db { provider = "postgresql" url = env("DATABASE_URL") shadowDatabaseUrl = env("SHADOW_DATABASE_URL") } Enter fullscreen mode Exit fullscreen mode That's solved now. 3. Now migrate your Database. npx prisma migrate dev Enter fullscreen mode Exit fullscreen mode Source link lol
Read More
[DAY 90-92] I made a shell script to build me a world cup database

[DAY 90-92] I made a shell script to build me a world cup database

Hi everyone! Welcome back to another blog where I document the things I learn in web development. I do this because it helps retain the information and concepts through active recall. On days 90-92, I finished building a script to automate creating a database, a translator using a shell script, and started building an interactive bash program. The first project is where I created a bash script to make a database about world cup matches in PostgreSQL. This is part 2 out of 5 certification projects in the relational databases course in freecodecamp. I also made a script on the…
Read More
DBOS-Cloud: Minimal Effort Change Data Capture (CDC) Tool

DBOS-Cloud: Minimal Effort Change Data Capture (CDC) Tool

This is a simple DBOS example focusing on remote deployment to DBOS Cloud, their hosted solution with a generous free tier for devs. The github repo sets up: 1) a workflow with an http api endpoint that receives events from Supabase when an INSERT is made to a table, 2) the same workflow archives the event payload to a DBOS hosted Postgres table, and 3) additional endpoints as utilities to view and delete all events while in development. Prerequisites Make sure you have node.js 21.x Sign up for DBOS Cloud (https://www.dbos.dev/dbos-cloud) Have a Supabase account and a table you are…
Read More
Migrating from MySQL to PostgreSQL

Migrating from MySQL to PostgreSQL

Migrating a database from MySQL to Postgres is a challenging process. While MySQL and Postgres do a similar job, there are some fundamental differences between them and those differences can create issues that need addressing for the migration to be successful. Where to start? Pg Loader is a tool that can be used to move your data to PostgreSQL, however, it's not perfect, but can work well in some cases. It's worth looking at to see if it's the direction you want to go. Another approach to take is to create custom scripts. Custom scripts offer greater flexibility and scope…
Read More
Monitoring, troubleshooting, and query analytics for PostgreSQL on Kubernetes

Monitoring, troubleshooting, and query analytics for PostgreSQL on Kubernetes

If you are learning about databases and Kubernetes or running or migrating PostgreSQL to Kubernetes, I want to show you a great open-source tool for database monitoring and troubleshooting. I will discuss a tool to help you better understand your database, its parameters, and its health. You can access a Query Analytics tool to help you find slow queries. In addition, you will have dashboards to monitor the Kubernetes cluster itself. In the previous article, I discussed the pgAdmin and PostgreSQL cluster created using Percona Everest. Today, I installed Percona Monitoring and Management (PMM) in my cluster, made some test…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.