text: -- MySQL dump 10.13  Distrib 8.0.15, for Linux (x86_64)
  --
  -- Host: localhost    Database: mshare
  -- ------------------------------------------------------
  -- Server version	8.0.15
  
  /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
   SET NAMES utf8mb4 ;
  /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  /*!40103 SET TIME_ZONE='+00:00' */;
  /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='' */;
  /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  
  --
  -- Table structure for table `spendings`
  --
  
  DROP TABLE IF EXISTS `spendings`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
   SET character_set_client = utf8mb4 ;
  CREATE TABLE `spendings` (
    `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `name` varchar(45) NOT NULL,
    `money_owed` bigint(20) unsigned NOT NULL,
    `creditor_user_id` bigint(20) unsigned NOT NULL,
    `group_id` bigint(20) unsigned NOT NULL,
    `date` varchar(10) NOT NULL,
    `is_future_date` tinyint(1) NOT NULL,
    PRIMARY KEY (`id`),
    KEY `fk_group_idx` (`group_id`),
    KEY `fk_creditor_idx` (`creditor_user_id`),
    CONSTRAINT `fk_creditor` FOREIGN KEY (`creditor_user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
    CONSTRAINT `fk_group` FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
  ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  
  /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  
  -- Dump completed on 2019-09-25 12:09:15
  