36436-vm/db/migrations/003_create_community_members_table.sql
Flatlogic Bot 2a74e9787f v1
2025-11-28 17:43:30 +00:00

10 lines
315 B
SQL

CREATE TABLE IF NOT EXISTS `community_members` (
`id` INT AUTO_INCREMENT PRIMARY KEY,
`user_id` INT NOT NULL,
`community_id` INT NOT NULL,
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (`user_id`) REFERENCES `users`(`id`),
FOREIGN KEY (`community_id`) REFERENCES `communities`(`id`)
);