Skip to content

Exkiober/CRUD-DB

Repository files navigation

This is created because i faced the limitation of Prisma

This is created for

  1. Read the schema for your database

  2. You edit a new one

  3. Script will compare and generate the sql you need

  4. You insert and migrate it

python3 -m venv venv

source venv/bin/activate

pip freeze > requirements.txt

pip install -r requirements.txt

First, make sure there is database and table the database you connect

Run the read_from_db.py to generate a json format schema under directory: schema/

Save a copy for it first under directory: schema/

You now have two copies of schema

Select one to edit (Add the new column with dtype for either table or Add a new table)

Run the alter.py after locate the name and location of the schema files

It will generate the sql you need to change from old schema to latest schema you editted

Insert it to your database and the structure/schema of your db will be changed

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages