social media crossposting tool. 3rd time's the charm
mastodon misskey crossposting bluesky
1import sqlite3 2 3 4def migrate(conn: sqlite3.Connection): 5 columns = conn.execute("PRAGMA table_info(posts)") 6 column_names = [col[1] for col in columns] 7 if "reposted_id" not in column_names: 8 _ = conn.execute(""" 9 ALTER TABLE posts 10 ADD COLUMN reposted_id INTEGER NULL REFERENCES posts(id) ON DELETE SET NULL 11 """)