feat: 切换到 PostgreSQL 数据库 (cssc) + 示例数据已导入

This commit is contained in:
maoshen
2026-04-10 13:15:18 +00:00
parent 315fd5878b
commit e342156e9f
47 changed files with 19 additions and 2 deletions

View File

@@ -49,3 +49,12 @@ Add whatever helps you do your job. This is your cheat sheet.
- **用户名**: mashen - **用户名**: mashen
- **密码**: 825670@MashenClaw - **密码**: 825670@MashenClaw
- **邮箱**: mashen@datalibstar.com - **邮箱**: mashen@datalibstar.com
## PostgreSQL 数据库
### 城市手册项目
- **主机**: 10.2.0.100:5432
- **数据库**: cssc
- **用户**: coder
- **密码**: 825670wl

View File

@@ -84,8 +84,12 @@ WSGI_APPLICATION = 'city_manual.wsgi.application'
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.sqlite3', 'ENGINE': 'django.db.backends.postgresql',
'NAME': BASE_DIR / 'db.sqlite3', 'NAME': 'cssc',
'USER': 'coder',
'PASSWORD': '825670wl',
'HOST': '10.2.0.100',
'PORT': '5432',
} }
} }

Binary file not shown.

View File

@@ -0,0 +1,4 @@
#!/bin/bash
cd /root/.openclaw/workspace/city-manual/backend
rm -f db.sqlite3 db.sqlite3-journal
python3 manage.py migrate