very basic orm structure and email support
This commit is contained in:
parent
c483e5f555
commit
3f1b735506
13 changed files with 1913 additions and 5 deletions
43
init_db.py
Normal file
43
init_db.py
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#!/usr/bin/env python3
|
||||
# SPDX-FileCopyrightText: 2025-present Micha Albert <info@micha.zone>
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
"""
|
||||
Carbon Copy Database Initialization Script
|
||||
|
||||
This script initializes the database and loads seed data for the Carbon Copy
|
||||
email-based multiplayer text adventure.
|
||||
"""
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
# Add the src directory to Python path
|
||||
project_root = Path(__file__).parent
|
||||
sys.path.insert(0, str(project_root / "src"))
|
||||
|
||||
from carbon_copy.database import create_db_and_tables
|
||||
from carbon_copy.seed_data import initialize_game_world
|
||||
|
||||
|
||||
def main():
|
||||
"""Initialize the database and load seed data."""
|
||||
print("Carbon Copy - Database Initialization")
|
||||
print("=" * 40)
|
||||
|
||||
print("Creating database tables...")
|
||||
create_db_and_tables()
|
||||
print("✓ Database tables created successfully")
|
||||
|
||||
print("\nLoading seed data...")
|
||||
initialize_game_world()
|
||||
print("✓ Seed data loaded successfully")
|
||||
|
||||
print("\nDatabase initialization complete!")
|
||||
print("You can now start the FastAPI server with:")
|
||||
print("uvicorn carbon_copy.main:app --reload")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue