Skip to content

Commit

Permalink
Merge pull request #753 from o-psi/remove-foreign-key
Browse files Browse the repository at this point in the history
Remove-foreign-key
  • Loading branch information
johnnyq authored Oct 12, 2023
2 parents 63ecb38 + 8bce945 commit df14ac8
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,6 @@
-- Table structure for table `accounts`
--

DROP TABLE IF EXISTS `account_types`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `account_types` (
`account_type_id` int(11) NOT NULL AUTO_INCREMENT,
`account_type_name` varchar(200) NOT NULL,
`account_type_description` text DEFAULT NULL,
`account_type_created_at` datetime NOT NULL DEFAULT current_timestamp(),
`account_type_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
`account_type_archived_at` datetime DEFAULT NULL,
PRIMARY KEY (`account_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

DROP TABLE IF EXISTS `accounts`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
Expand All @@ -45,11 +32,23 @@ CREATE TABLE `accounts` (
`account_created_at` datetime NOT NULL DEFAULT current_timestamp(),
`account_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
`account_archived_at` datetime DEFAULT NULL,
PRIMARY KEY (`account_id`),
CONSTRAINT `fk_accounts_account_type_id` FOREIGN KEY (`account_type`) REFERENCES `account_types` (`account_type_id`)
PRIMARY KEY (`account_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

DROP TABLE IF EXISTS `account_types`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `account_types` (
`account_type_id` int(11) NOT NULL AUTO_INCREMENT,
`account_type_name` varchar(200) NOT NULL,
`account_type_description` text DEFAULT NULL,
`account_type_created_at` datetime NOT NULL DEFAULT current_timestamp(),
`account_type_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
`account_type_archived_at` datetime DEFAULT NULL,
PRIMARY KEY (`account_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Table structure for table `api_keys`
--
Expand Down

0 comments on commit df14ac8

Please sign in to comment.