GNU/Weeb Mailing List <[email protected]>
 help / color / mirror / Atom feed
From: Ammar Faizi <[email protected]>
To: Gilang Fachrezy <[email protected]>
Cc: Ammar Faizi <[email protected]>,
	Taufiq Pohan <[email protected]>,
	Aldy Prastyo <[email protected]>,
	Muhammad Fitrah Pandjalu <[email protected]>,
	Nauvalsa Yanandana <[email protected]>,
	GNU/Weeb Mailing List <[email protected]>,
	VNLX Kernel Department <[email protected]>
Subject: [PATCH v1 07/13] Export the DDL
Date: Mon, 28 Nov 2022 03:32:10 +0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

Initial work of the database part.

Co-authored-by: Muhammad Fitrah Pandjalu <[email protected]>
Signed-off-by: Muhammad Fitrah Pandjalu <[email protected]>
Co-authored-by: Taufiq Pohan <[email protected]>
Signed-off-by: Taufiq Pohan <[email protected]>
Signed-off-by: Ammar Faizi <[email protected]>
---
 database.sql | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)
 create mode 100644 database.sql

diff --git a/database.sql b/database.sql
new file mode 100644
index 0000000..909d987
--- /dev/null
+++ b/database.sql
@@ -0,0 +1,57 @@
+-- Adminer 4.8.1 MySQL 8.0.31-0ubuntu0.22.04.1 dump
+
+SET NAMES utf8;
+SET time_zone = '+00:00';
+SET foreign_key_checks = 0;
+SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
+
+SET NAMES utf8mb4;
+
+DROP TABLE IF EXISTS `attendances`;
+CREATE TABLE `attendances` (
+  `id` int unsigned NOT NULL AUTO_INCREMENT,
+  `city_id` int unsigned DEFAULT NULL,
+  `full_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci NOT NULL,
+  `phone_number` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
+  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
+  `facebook_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `twitter_username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `discord_username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `github_username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `created_at` datetime DEFAULT NULL,
+  PRIMARY KEY (`id`),
+  KEY `full_name` (`full_name`),
+  KEY `phone_number` (`phone_number`),
+  KEY `email` (`email`),
+  KEY `facebook_id` (`facebook_id`),
+  KEY `twitter_username` (`twitter_username`),
+  KEY `discord_username` (`discord_username`),
+  KEY `github_username` (`github_username`),
+  KEY `created_at` (`created_at`),
+  KEY `city_id` (`city_id`),
+  CONSTRAINT `attendances_ibfk_2` FOREIGN KEY (`city_id`) REFERENCES `cities` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
+
+
+DROP TABLE IF EXISTS `cities`;
+CREATE TABLE `cities` (
+  `id` int unsigned NOT NULL AUTO_INCREMENT,
+  `province_id` tinyint unsigned NOT NULL,
+  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
+  PRIMARY KEY (`id`),
+  KEY `name` (`name`),
+  KEY `province_id` (`province_id`),
+  CONSTRAINT `cities_ibfk_3` FOREIGN KEY (`province_id`) REFERENCES `provinces` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
+
+
+DROP TABLE IF EXISTS `provinces`;
+CREATE TABLE `provinces` (
+  `id` tinyint unsigned NOT NULL AUTO_INCREMENT,
+  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `name` (`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
+
+
+-- 2022-11-27 18:33:10
-- 
Ammar Faizi


  parent reply	other threads:[~2022-11-27 20:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-27 20:32 [PATCH v1 00/13] App for member attendance record at Senayan Park, Jakarta Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 01/13] Initial index page Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 02/13] Add regions.json Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 03/13] index: Integrate city data with the form Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 04/13] index: Add social media accounts input Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 05/13] index: Add a red star to the required fields Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 06/13] index: city: Add "select the city" option on blank form Ammar Faizi
2022-11-27 20:32 ` Ammar Faizi [this message]
2022-11-27 20:32 ` [PATCH v1 08/13] Initial work on the database integration Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 09/13] Create initial API integration Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 10/13] Add input form validation Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 11/13] assets: Add sweetalert library Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 12/13] index: Integrate the sweetalert library with the form Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 13/13] index: Make sure there is no duplicate submission in the same day Ammar Faizi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox