GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - pythongosssss/sqlalchemy-sample

BranchesTags
Open more actions menu

Latest commit

 

History

1 Commit
1 Commit

Folders and files

NameName
Last commit message
Last commit date
alembic
alembic
 
 
db
db
 
 
.gitignore
.gitignore
 
 
alembic.ini
alembic.ini
 
 
main.py
main.py
 
 
readme.md
readme.md
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

Sample sqlalchemy project showing simple usage, schema migration and data migration.

Setup

Create virtual environment
python -m venv venv

Activate virtual environment
venv\Scripts\activate (Windows)
source venv/bin/activate (Linux/MacOS)

Install dependencies
pip install -r requirements.txt

Running

python main.py

Altering the database

Update db/models.py to e.g. add new column

Generate a new migration
alembic revision --autogenerate -m "your message"

Test upgrade

alembic upgrade head or running main.py will do this automatically if required

Downgrade

alembic downgrade -1

Reset migration/database

Delete alembic/versions/*
Delete testdb.db
Generate a new migration

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

2 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.