You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: Update README.md to reflect Alembic migration process and application structure changes
- Revised the database initialization section to specify the use of Alembic for migrations.
- Updated application entry point from `app.py` to `main.py`.
- Added notes on running migrations manually before starting the application.
- Clarified project structure and included details about the new `alembic/` directory for migrations.
Copy file name to clipboardExpand all lines: README.md
+31-11Lines changed: 31 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,10 +65,16 @@ A web platform for hosting and participating in collaborative online competition
65
65
66
66
d. Users can then click "Login with Wikimedia" on the login page
67
67
68
-
7.**Initialize database**
68
+
7.**Initialize database with Alembic migrations**
69
69
```bash
70
-
python init_db.py
70
+
# Apply all database migrations
71
+
alembic upgrade head
72
+
73
+
# Or use the helper script
74
+
python scripts/migrate.py upgrade head
71
75
```
76
+
77
+
**Note**: The app does not automatically run migrations on startup. You must run Alembic migrations manually before starting the application.
72
78
73
79
8.**Run the application**
74
80
@@ -78,7 +84,7 @@ A web platform for hosting and participating in collaborative online competition
78
84
79
85
Terminal 1 - Flask Backend:
80
86
```bash
81
-
python app.py
87
+
python main.py
82
88
```
83
89
84
90
Terminal 2 - Vue.js Frontend:
@@ -98,7 +104,7 @@ A web platform for hosting and participating in collaborative online competition
98
104
npm install # Only needed first time
99
105
npm run build
100
106
cd ../backend
101
-
python app.py
107
+
python main.py
102
108
```
103
109
104
110
Access at: `http://localhost:5000` (Flask serves built Vue.js files)
@@ -109,6 +115,8 @@ A web platform for hosting and participating in collaborative online competition
109
115
110
116
**Quick Testing Option**: If you want to skip MySQL setup, edit `.env` and change `DATABASE_URL` to `sqlite:///wikicontest.db`
111
117
118
+
**Database Migrations**: The application uses Alembic for database migrations. Always run `alembic upgrade head` before starting the app to ensure your database schema is up to date. The app does not automatically run migrations on startup.
119
+
112
120
**Frontend Development**: For the best development experience, run the Vue.js dev server (`npm run dev` in `frontend/` directory) alongside Flask. The dev server proxies API requests to Flask automatically.
113
121
114
122
## 🔧 Configuration
@@ -146,8 +154,11 @@ The `.env.example` file contains all configuration options. Copy it to `.env` an
0 commit comments