Skip to content

Commit

Permalink
Update DB
Browse files Browse the repository at this point in the history
  • Loading branch information
kee236 committed Aug 21, 2024
1 parent 5b2acc5 commit b1c7fa1
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions DB/announcement.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

-- Table structure for table `announcement`
--

DROP TABLE IF EXISTS `announcement`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `announcement` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`description` text NOT NULL,
`created_at` datetime NOT NULL,
`user_id` int(11) NOT NULL DEFAULT 0 COMMENT '0 means all',
`is_seen` enum('0','1') NOT NULL DEFAULT '0',
`seen_by` text NOT NULL COMMENT 'if user_id = 0 then comma seperated user_ids',
`last_seen_at` datetime NOT NULL,
`color_class` varchar(50) NOT NULL DEFAULT 'primary',
`icon` varchar(50) NOT NULL DEFAULT 'fas fa-bell',
`status` enum('published','draft') NOT NULL DEFAULT 'draft',
PRIMARY KEY (`id`),
KEY `for_user_id` (`user_id`,`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `announcement`
--

LOCK TABLES `announcement` WRITE;
/*!40000 ALTER TABLE `announcement` DISABLE KEYS */;
/*!40000 ALTER TABLE `announcement` ENABLE KEYS */;
UNLOCK TABLES;

0 comments on commit b1c7fa1

Please sign in to comment.