mirror of
https://github.com/devproje/balance-application.git
synced 2024-10-21 00:11:21 +09:00
26 lines
342 B
Python
26 lines
342 B
Python
|
import psycopg2
|
||
|
from util.config import conn_param
|
||
|
|
||
|
def __main__():
|
||
|
conn = psycopg2.connect(conn_param)
|
||
|
cur = conn.cursor()
|
||
|
|
||
|
cur.execute(
|
||
|
"""
|
||
|
create table balset(
|
||
|
id serial primary key,
|
||
|
name varchar(50),
|
||
|
date bigint,
|
||
|
price bigint,
|
||
|
memo varchar(300)
|
||
|
);
|
||
|
"""
|
||
|
)
|
||
|
|
||
|
conn.commit()
|
||
|
|
||
|
cur.close()
|
||
|
conn.close()
|
||
|
|
||
|
__main__()
|