worked on database definition file

This commit is contained in:
j37hr0 2026-05-09 18:55:48 +12:00
parent 3f6148ef81
commit b743ea6fbd
2 changed files with 22 additions and 6 deletions

View file

@ -10,12 +10,9 @@ def run(playwright: Playwright):
browser = chromium.launch()
page = browser.new_page()
response = page.goto(os.getenv("URL"))
# print(response.status)
# print(response.url)
# print(response.ok)
#page.fill("input#ctl00_ContentPlaceHolder1_txtLoginID", os.getenv("USERNAME"))
#page.fill("input#ctl00_ContentPlaceHolder1_txtPassword", os.getenv("PASSWORD"))
#page.click("input#ctl00_ContentPlaceHolder1_btnLogin")
page.fill("input#ctl00_ContentPlaceHolder1_txtLoginID", os.getenv("USERNAME"))
page.fill("input#ctl00_ContentPlaceHolder1_txtPassword", os.getenv("PASSWORD"))
page.click("input#ctl00_ContentPlaceHolder1_btnLogin")
#
print(page.content())
browser.close()

View file

@ -0,0 +1,19 @@
CREATE table IF NOT EXISTS accounts(
id SERIAL PRIMARY KEY,
accountnum VARCHAR UNIQUE NOT NULL,
accountname VARCHAR UNIQUE NOT NULL,
orgid int -- this needs to be a foregn key on organizations
);
CREATE TABLE IF NOT EXISTS organizations(
id SERIAL PRIMARY KEY,
orgname VARCHAR(50) UNIQUE NOT NULL
)
CREATE TABLE IF NOT EXISTS transactions(
id SERIAL PRIMARY KEY,
datetime DATE NOT NULL,
amount REAL NOT NULL,
accountid INT NOT NULL --foreign key from accounts
orgid INT NOT NULL --foreign key from organizations
)