-- --------------------------------------------------------
-- Host:                         127.0.0.1
-- Server version:               10.4.32-MariaDB - mariadb.org binary distribution
-- Server OS:                    Win64
-- HeidiSQL Version:             12.8.0.6908
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;


-- Dumping database structure for b.iespejas
CREATE DATABASE IF NOT EXISTS `b.iespejas` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */;
USE `b.iespejas`;

-- Dumping structure for table b.iespejas.elements
CREATE TABLE IF NOT EXISTS `elements` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `users_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_elements_users` (`users_id`),
  CONSTRAINT `FK_elements_users` FOREIGN KEY (`users_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=148 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- Dumping data for table b.iespejas.elements: ~7 rows (approximately)
INSERT INTO `elements` (`id`, `name`, `created_at`, `users_id`) VALUES
	(1, '🔥 uguns', '2025-01-14 22:05:25', NULL),
	(2, '💧 ūdens', '2025-01-14 22:05:41', NULL),
	(112, '🌱 dzīvība', '2025-02-04 21:25:36', 9),
	(144, '🔥 uguns', '2025-04-19 15:29:46', 22),
	(145, '💧 ūdens', '2025-04-19 15:29:46', 22),
	(146, '🌎 zeme', '2025-04-19 15:29:47', 22),
	(147, '💨 gaiss', '2025-04-19 15:29:47', 22);

-- Dumping structure for table b.iespejas.saved_elements
CREATE TABLE IF NOT EXISTS `saved_elements` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `saved_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `users_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_saved_elements_users` (`users_id`),
  CONSTRAINT `FK_saved_elements_users` FOREIGN KEY (`users_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- Dumping data for table b.iespejas.saved_elements: ~4 rows (approximately)
INSERT INTO `saved_elements` (`id`, `name`, `saved_at`, `users_id`) VALUES
	(35, '🌱 dzīvība', '2025-02-04 21:25:39', 9),
	(36, '💨 gaiss', '2025-04-19 13:55:35', 9),
	(39, '💧 ūdens', '2025-04-19 15:30:51', 22),
	(40, '🔥 uguns', '2025-04-19 15:30:55', 22);

-- Dumping structure for table b.iespejas.users
CREATE TABLE IF NOT EXISTS `users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- Dumping data for table b.iespejas.users: ~2 rows (approximately)
INSERT INTO `users` (`id`, `email`, `password`, `created_at`) VALUES
	(8, 'cacests05@gmail.com', '$2y$10$CGSpGhZ9bWxdsdcxRRn14u8/9zayXF1LqsQDf6qaAePlrCfqQaMYW', '2025-01-15 00:10:15'),
	(9, '123@gmail.com', '$2y$10$to5Q9A9hViQQkN7dvSyidu8mKBOv9h3xglS3i3fSK19Np2OD.EbHi', '2025-02-04 21:07:04'),
	(22, '1@gmail.com', '$2y$10$9M9UDI9rz9RZFneRGRp3b.cCkzsVrRFV3SPhlQNG7tgGguCx63PyS', '2025-04-19 15:29:46');

/*!40103 SET TIME_ZONE=IFNULL(@OLD_TIME_ZONE, 'system') */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;
