...
This commit is contained in:
parent
7295166781
commit
9211546b4f
8 changed files with 553 additions and 8 deletions
20
tools/create_indices.sql
Normal file
20
tools/create_indices.sql
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
CREATE INDEX idx_round_id ON games (round_id);
|
||||
|
||||
CREATE INDEX idx_league_id ON leagues_matches (league_id);
|
||||
CREATE INDEX idx_round_id ON leagues_matches (round_id);
|
||||
|
||||
CREATE INDEX idx_user_id ON leagues_members (user_id);
|
||||
CREATE INDEX idx_league_id ON leagues_members (league_id);
|
||||
|
||||
CREATE INDEX idx_season_id ON manual_payouts (season_id);
|
||||
CREATE INDEX idx_user_id ON manual_payouts (user_id);
|
||||
|
||||
CREATE INDEX idx_season_id ON payments (season_id);
|
||||
CREATE INDEX idx_user_id ON payments (user_id);
|
||||
|
||||
CREATE INDEX idx_season_id ON quotas (season_id);
|
||||
|
||||
CREATE INDEX idx_season_id ON rounds (season_id);
|
||||
|
||||
CREATE INDEX idx_user_id ON tipps (user_id);
|
||||
CREATE INDEX idx_game_id ON tipps (game_id);
|
||||
471
tools/pfosten_2023-01-25_144310.sql
Normal file
471
tools/pfosten_2023-01-25_144310.sql
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
mysql -h localhost -P 3306 --password=pf_password --protocol=tcp -u root
|
||||
mysql -h localhost -P 3306 --password=pf_password --protocol=tcp -u root pfosten
|
||||
|
|
|
|||
54
tools/upload_test.py
Executable file
54
tools/upload_test.py
Executable file
|
|
@ -0,0 +1,54 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
import ftplib
|
||||
|
||||
#session = ftplib.FTP('hoschis-tippspiel.de','w0172dd3','DyhrkJaf3NMY')
|
||||
#session = ftplib.FTP('programmschmiede.de','w00c9c8c','qreny52h')
|
||||
#file = open('upload_test.py','rb') # file to send
|
||||
#session.storbinary('STOR upload_test.py', file) # send the file
|
||||
#file.close() # close file and FTP
|
||||
#session.quit()
|
||||
|
||||
import os.path, os
|
||||
from ftplib import FTP, error_perm
|
||||
|
||||
host = 'programmschmiede.de'
|
||||
port = 21
|
||||
user = "w00c9c8c"
|
||||
password = "qreny52h"
|
||||
|
||||
ftp = FTP()
|
||||
ftp.connect(host,port)
|
||||
ftp.login(user,password)
|
||||
ftp.cwd("pfosten")
|
||||
filenameCV = "../pfosten"
|
||||
|
||||
|
||||
def placeFiles(ftp, path):
|
||||
for name in os.listdir(path):
|
||||
localpath = os.path.join(path, name)
|
||||
if os.path.isfile(localpath):
|
||||
print("STOR", name, localpath)
|
||||
ftp.storbinary('STOR ' + name, open(localpath,'rb'))
|
||||
#print("name:",name)
|
||||
#print("Localpath:",localpath)
|
||||
elif os.path.isdir(localpath):
|
||||
#print("MKD", name)
|
||||
|
||||
try:
|
||||
ftp.mkd(name)
|
||||
|
||||
# ignore "directory already exists"
|
||||
except error_perm as e:
|
||||
if not e.args[0].startswith('550'):
|
||||
raise
|
||||
|
||||
#print("CWD", name)
|
||||
ftp.cwd(name)
|
||||
placeFiles(ftp, localpath)
|
||||
#print("CWD", "..")
|
||||
ftp.cwd("..")
|
||||
|
||||
placeFiles(ftp, filenameCV)
|
||||
|
||||
ftp.quit()
|
||||
Loading…
Add table
Add a link
Reference in a new issue