added data presets
This commit is contained in:
parent
8d9886fc8d
commit
38c3ed3f64
5
data_persistance/answer.py
Normal file
5
data_persistance/answer.py
Normal file
@ -0,0 +1,5 @@
|
||||
from tables import Answer
|
||||
|
||||
ANSWER = [
|
||||
|
||||
]
|
25
data_persistance/data.py
Normal file
25
data_persistance/data.py
Normal file
@ -0,0 +1,25 @@
|
||||
from sqlalchemy import create_engine
|
||||
from sqlalchemy.orm import Session
|
||||
from tables import *
|
||||
|
||||
from answer import ANSWER
|
||||
from locales import LOCALES
|
||||
from npc import NPCS
|
||||
from places import PLACES
|
||||
from questions import QUESTIONS
|
||||
from reactions import REACTIONS
|
||||
from traits import TRAITS
|
||||
|
||||
|
||||
# Create Engine and tables
|
||||
engine = create_engine("sqlite://", echo=True, future=True)
|
||||
Base.metadata.create_all(engine)
|
||||
|
||||
with Session(engine) as session:
|
||||
session.add_all(ANSWER)
|
||||
session.add_all(LOCALES)
|
||||
session.add_all(NPCS)
|
||||
session.add_all(PLACES)
|
||||
session.add_all(QUESTIONS)
|
||||
session.add_all(REACTIONS)
|
||||
session.add_all(TRAITS)
|
5
data_persistance/locales.py
Normal file
5
data_persistance/locales.py
Normal file
@ -0,0 +1,5 @@
|
||||
from tables import Locale
|
||||
|
||||
LOCALES = [
|
||||
Locale(0,"EN", "Hello World"),
|
||||
]
|
5
data_persistance/npc.py
Normal file
5
data_persistance/npc.py
Normal file
@ -0,0 +1,5 @@
|
||||
from tables import Npc
|
||||
|
||||
NPCS = [
|
||||
|
||||
]
|
5
data_persistance/places.py
Normal file
5
data_persistance/places.py
Normal file
@ -0,0 +1,5 @@
|
||||
from tables import Place
|
||||
|
||||
PLACES = [
|
||||
|
||||
]
|
5
data_persistance/questions.py
Normal file
5
data_persistance/questions.py
Normal file
@ -0,0 +1,5 @@
|
||||
from tables import Question
|
||||
|
||||
QUESTIONS = [
|
||||
|
||||
]
|
5
data_persistance/reactions.py
Normal file
5
data_persistance/reactions.py
Normal file
@ -0,0 +1,5 @@
|
||||
from tables import Reaction
|
||||
|
||||
REACTIONS = [
|
||||
|
||||
]
|
5
data_persistance/traits.py
Normal file
5
data_persistance/traits.py
Normal file
@ -0,0 +1,5 @@
|
||||
from tables import Trait
|
||||
|
||||
TRAITS = [
|
||||
|
||||
]
|
Loading…
Reference in New Issue
Block a user