-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdB_setup.py
More file actions
26 lines (21 loc) · 805 Bytes
/
dB_setup.py
File metadata and controls
26 lines (21 loc) · 805 Bytes
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
import os
import sys
from sqlalchemy import Column, ForeignKey, Integer, String, Date, Numeric, Boolean, UniqueConstraint, DateTime
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy import create_engine
Base = declarative_base()
class MissingPeople(Base):
__tablename__='missingpeople'
id=Column(Integer,primary_key=True)
email=Column(String(80),nullable=False)
name=Column(String(80),nullable=False)
phonenumber=Column(Integer,nullable=False)
class FoundPeople(Base):
__tablename__='foundpeople'
id=Column(Integer,primary_key=True)
email=Column(String(80),nullable=False)
name=Column(String(80),nullable=False)
phonenumber=Column(Integer,nullable=False)
engine=create_engine('sqlite:///DLH.db')
Base.metadata.create_all(engine)