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()
|
||||
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()
|
||||
|
|
|
|||
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