worked on database definition file
This commit is contained in:
parent
3f6148ef81
commit
b743ea6fbd
|
|
@ -10,12 +10,9 @@ def run(playwright: Playwright):
|
||||||
browser = chromium.launch()
|
browser = chromium.launch()
|
||||||
page = browser.new_page()
|
page = browser.new_page()
|
||||||
response = page.goto(os.getenv("URL"))
|
response = page.goto(os.getenv("URL"))
|
||||||
# print(response.status)
|
page.fill("input#ctl00_ContentPlaceHolder1_txtLoginID", os.getenv("USERNAME"))
|
||||||
# print(response.url)
|
page.fill("input#ctl00_ContentPlaceHolder1_txtPassword", os.getenv("PASSWORD"))
|
||||||
# print(response.ok)
|
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())
|
print(page.content())
|
||||||
browser.close()
|
browser.close()
|
||||||
|
|
|
||||||
19
sql/database definitions.sql
Normal file
19
sql/database definitions.sql
Normal 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
|
||||||
|
)
|
||||||
Loading…
Reference in a new issue