Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

OpenTeens/identity

Repository files navigation

Identity Backend

Install UV

This project uses UV as the package manager. You have to install it first, if you don't have it already.

# Linux / MacOS
curl -LsSf https://astral.sh/uv/install.sh | sh
# Or Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Install Deps

uv sync

Run

uv run task dev # development
uv run task serve # production

Migrations

在开发的过程中,我们可能会多次修改数据库 model,这个时候我们需要生成 migration 文件。并对数据库进行迁移。

修改模型后先运行:

uv run alembic revision --autogenerate -m "your message"

alembic/versions 下面生成的文件和模型修改一起 commit 上去

然后运行一次迁移命令,如果是拉取了最新的代码,也要运行一次迁移命令:

uv run alembic upgrade head

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

AltStyle によって変換されたページ (->オリジナル) /