File size: 820 Bytes
74de430
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""
Database Seeding Script
Populates database with initial test data
"""
from sqlalchemy.orm import Session
from app.core.database import SessionLocal, engine
from app.models.base import Base

# TODO: Import models and create seed data


def seed_database():
    """Seed database with initial data"""
    db = SessionLocal()
    
    try:
        print("Seeding database...")
        
        # TODO: Create seed data
        # - Platform admin user
        # - Sample client
        # - Sample contractor
        # - Sample project
        # - Sample users
        
        db.commit()
        print("Database seeded successfully!")
        
    except Exception as e:
        print(f"Error seeding database: {e}")
        db.rollback()
    finally:
        db.close()


if __name__ == "__main__":
    seed_database()