mirror of
https://github.com/OHV-IT/collabrix.git
synced 2025-12-15 16:48:36 +01:00
- Complete chat application similar to Microsoft Teams - Code snippet library with syntax highlighting - Real-time messaging with WebSockets - File upload with Office integration - Department-based permissions - Dark/Light theme support - Production deployment with SSL/Reverse Proxy - Docker containerization - PostgreSQL database with SQLModel ORM
29 lines
801 B
Python
29 lines
801 B
Python
#!/usr/bin/env python3
|
|
"""Add reply_to_id column to message and direct_message tables"""
|
|
import psycopg2
|
|
|
|
def main():
|
|
conn = psycopg2.connect('postgresql://postgres:your_password@192.168.0.19/OfficeDesk')
|
|
cur = conn.cursor()
|
|
|
|
print("Adding reply_to_id column to message table...")
|
|
cur.execute('''
|
|
ALTER TABLE message
|
|
ADD COLUMN IF NOT EXISTS reply_to_id INTEGER REFERENCES message(id)
|
|
''')
|
|
|
|
print("Adding reply_to_id column to direct_message table...")
|
|
cur.execute('''
|
|
ALTER TABLE direct_message
|
|
ADD COLUMN IF NOT EXISTS reply_to_id INTEGER REFERENCES direct_message(id)
|
|
''')
|
|
|
|
conn.commit()
|
|
print("✅ Reply columns added successfully!")
|
|
|
|
cur.close()
|
|
conn.close()
|
|
|
|
if __name__ == "__main__":
|
|
main()
|