Fixed checking db_config params and changed email column type to bigint

This commit is contained in:
spla 2022-08-02 08:04:30 +02:00
pare c7b5deb32a
commit 130fbdbdbd
S'han modificat 3 arxius amb 3 adicions i 3 eliminacions

Veure arxiu

@ -146,7 +146,7 @@ if __name__ == '__main__':
db = mailing_db
db_user = mailing_db_user
table = mailing_db_table
sql = "create table " + table + "(datetime timestamptz, account_id int primary key, username varchar(30), email varchar(60), emailed_at timestamptz,"
sql = "create table " + table + "(datetime timestamptz, account_id bigint primary key, username varchar(30), email varchar(60), emailed_at timestamptz,"
sql += "emailed boolean default False, deleted boolean default False, elapsed_days varchar(30), to_be_deleted boolean default False,"
sql += "recipient_error boolean default False, feedback boolean default False, current_sign_in_at timestamptz)"
create_table(db, db_user, table, sql)

Veure arxiu

@ -37,7 +37,7 @@ def get_parameter( parameter, file_path ):
if not os.path.isfile(file_path):
if file_path == "secrets/secrets.txt":
print("File %s not found, exiting. Run setup.py."%file_path)
elif file_path == "config.txt":
elif file_path == "config/db_config.txt":
print("File %s not found, exiting. Run db-setup.py."%file_path)
sys.exit(0)

Veure arxiu

@ -1 +1 @@
psycopg2-binary>=2.8.4
psycopg2-binary