Skip to content

Commit f1fd1f0

Browse files
committed
chore: add sql script for masjid_followers table
1 parent 4873161 commit f1fd1f0

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

update_followers.sql

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CREATE TABLE `masjid_followers` (
2+
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
3+
`masjid_id` int(11) UNSIGNED NOT NULL,
4+
`user_id` int(11) UNSIGNED NOT NULL,
5+
`created_at` datetime DEFAULT NULL,
6+
`updated_at` datetime DEFAULT NULL,
7+
PRIMARY KEY (`id`),
8+
KEY `masjid_id` (`masjid_id`),
9+
KEY `user_id` (`user_id`),
10+
CONSTRAINT `masjid_followers_masjid_id_foreign` FOREIGN KEY (`masjid_id`) REFERENCES `masjid` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
11+
CONSTRAINT `masjid_followers_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
12+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

0 commit comments

Comments
 (0)