add database generators
This commit is contained in:
parent
50c2af4a51
commit
7b080d7a7f
|
@ -0,0 +1,21 @@
|
|||
import sqlite3
|
||||
from sqlite3 import Error
|
||||
# if you decide to change the file name you will have to update the code accordingly
|
||||
connection = sqlite3.connect("msgarchive.sqlite")
|
||||
|
||||
with connection:
|
||||
connection.execute("""
|
||||
CREATE TABLE ARCHIVE (
|
||||
id TEXT not null,
|
||||
author TEXT not null,
|
||||
content TEXT not null,
|
||||
clean_content TEXT not null,
|
||||
jump_url TEXT not null,
|
||||
attachment_url TEXT,
|
||||
date TEXT not null,
|
||||
date_edited TEXT,
|
||||
hash TEXT not null,
|
||||
uuid TEXT not null
|
||||
unique (id)
|
||||
);
|
||||
""")
|
|
@ -0,0 +1,16 @@
|
|||
# This script creates a database intended to be used with the main bot for the tagging command
|
||||
import sqlite3
|
||||
from sqlite3 import Error
|
||||
# if you decide to change the file name you will have to update the code accordingly
|
||||
connection = sqlite3.connect("tagbot.sqlite")
|
||||
|
||||
with connection:
|
||||
connection.execute("""
|
||||
CREATE TABLE TAG (
|
||||
id INTEGER,
|
||||
name TEXT not null,
|
||||
content TEXT not null,
|
||||
date INTEGER,
|
||||
unique (name)
|
||||
);
|
||||
""")
|
Loading…
Reference in New Issue