2017-10-17 18:49:28 +00:00
|
|
|
import db
|
|
|
|
|
2017-10-30 09:46:37 +00:00
|
|
|
session = db.Session()
|
|
|
|
user = db.Royal.create(session, input("Nome account: "))
|
|
|
|
session.add(user)
|
|
|
|
session.commit()
|
2017-10-25 09:09:06 +00:00
|
|
|
try:
|
2017-10-30 09:46:37 +00:00
|
|
|
steam = db.Steam.create(session, user.id, input("Steam ID 1: "))
|
2017-10-27 09:53:05 +00:00
|
|
|
except Exception as e:
|
|
|
|
print(e)
|
2017-10-25 09:09:06 +00:00
|
|
|
else:
|
2017-10-30 09:46:37 +00:00
|
|
|
session.add(steam)
|
2017-10-25 09:09:06 +00:00
|
|
|
try:
|
2017-10-30 09:46:37 +00:00
|
|
|
dota = db.Dota.create(session, steam.steam_id)
|
2017-10-27 09:53:05 +00:00
|
|
|
except Exception as e:
|
|
|
|
print(e)
|
2017-10-25 09:09:06 +00:00
|
|
|
else:
|
2017-10-30 09:46:37 +00:00
|
|
|
session.add(dota)
|
2017-10-25 09:09:06 +00:00
|
|
|
try:
|
2017-10-30 09:46:37 +00:00
|
|
|
rl = db.RocketLeague.create(session, steam.steam_id)
|
2017-10-27 09:53:05 +00:00
|
|
|
except Exception as e:
|
|
|
|
print(e)
|
2017-10-25 09:09:06 +00:00
|
|
|
else:
|
2017-10-30 09:46:37 +00:00
|
|
|
session.add(rl)
|
2017-10-25 09:09:06 +00:00
|
|
|
try:
|
2017-10-30 09:46:37 +00:00
|
|
|
osu = db.Osu.create(session, user.id, input("Osu! username: "))
|
2017-10-27 09:53:05 +00:00
|
|
|
except Exception as e:
|
|
|
|
print(e)
|
2017-10-25 09:09:06 +00:00
|
|
|
else:
|
2017-10-30 09:46:37 +00:00
|
|
|
session.add(osu)
|
2017-10-25 09:09:06 +00:00
|
|
|
try:
|
2017-10-30 09:46:37 +00:00
|
|
|
overwatch = db.Overwatch.create(session, user.id, input("Battle.net battletag: "))
|
2017-10-27 09:53:05 +00:00
|
|
|
except Exception as e:
|
|
|
|
print(e)
|
2017-10-25 09:09:06 +00:00
|
|
|
else:
|
2017-10-30 09:46:37 +00:00
|
|
|
session.add(overwatch)
|
2017-10-25 09:09:06 +00:00
|
|
|
try:
|
2017-10-30 09:46:37 +00:00
|
|
|
lol = db.LeagueOfLegends.create(session, user.id, input("League summoner name: "))
|
2017-10-27 09:53:05 +00:00
|
|
|
except Exception as e:
|
|
|
|
print(e)
|
2017-10-25 09:09:06 +00:00
|
|
|
else:
|
2017-10-30 09:46:37 +00:00
|
|
|
session.add(lol)
|
|
|
|
session.commit()
|
|
|
|
session.close()
|