36318-vm/db/migrations/002_create_posts_table.sql
Flatlogic Bot 5274c73966 Base app
2025-11-26 13:53:30 +00:00

8 lines
229 B
SQL

CREATE TABLE IF NOT EXISTS posts (
id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT NOT NULL,
content TEXT NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES users(id)
);