forked from andika/membership-be
first commit
This commit is contained in:
16
init_db.py
Normal file
16
init_db.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Database initialization script.
|
||||
Creates all tables defined in models.py
|
||||
"""
|
||||
|
||||
from database import Base, engine
|
||||
from models import User, Event, EventRSVP, SubscriptionPlan, Subscription
|
||||
|
||||
def init_database():
|
||||
"""Create all database tables"""
|
||||
print("Creating database tables...")
|
||||
Base.metadata.create_all(bind=engine)
|
||||
print("✅ Database tables created successfully!")
|
||||
|
||||
if __name__ == "__main__":
|
||||
init_database()
|
||||
Reference in New Issue
Block a user