From 0fc21cc4614914437ff0877c3d09b5bb15749511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sun, 23 Apr 2023 17:36:22 +0200 Subject: [PATCH] RVRNEXT-5 add migration for currencies --- .../migrations/structure/20230421_2234_currencies.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 database/migrations/structure/20230421_2234_currencies.sql diff --git a/database/migrations/structure/20230421_2234_currencies.sql b/database/migrations/structure/20230421_2234_currencies.sql new file mode 100644 index 0000000..70a0bb4 --- /dev/null +++ b/database/migrations/structure/20230421_2234_currencies.sql @@ -0,0 +1,10 @@ +CREATE TABLE `currencies` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `community_id` int(10) unsigned NOT NULL, + `code` varchar(3) NOT NULL, + `round_digits` tinyint(1) unsigned NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique_currency_for_community` (`community_id`, `code`), + KEY `community_id` (`community_id`), + CONSTRAINT `currencies_community_id` FOREIGN KEY (`community_id`) REFERENCES `communities` (`id`) +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;