Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try:
- conn = psycopg2.connect("dbname='discordLogs' user='discord' host='localhost' password=''")
- cursor = conn.cursor()
- except Exception as e:
- print("Can't connect to db")
- print(e)
- sys.exit()
- cursor.execute("""CREATE TABLE public.test_messages
- (
- message_id bigint NOT NULL,
- author_id bigint,
- "timestamp" timestamp with time zone,
- edited_timestamp timestamp with time zone,
- reaction_names character varying(50)[],
- reaction_counts integer[],
- message text,
- CONSTRAINT test_messages_pkey PRIMARY KEY (message_id)
- )
- """)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement