-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 29, 2022 at 09:50 PM
-- Server version: 10.4.22-MariaDB
-- PHP Version: 7.4.27

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!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 */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `personals`
--

-- --------------------------------------------------------

--
-- Table structure for table `adreses`
--

CREATE TABLE `adreses` (
  `deklareta adrese` int(30) DEFAULT NULL,
  `faktiska adrese` int(30) DEFAULT NULL,
  `id` int(11) NOT NULL,
  `id_persona` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `amati`
--

CREATE TABLE `amati` (
  `a_kods` int(6) NOT NULL COMMENT 'Amata kods',
  `datums no` date NOT NULL COMMENT 'amata laiks no',
  `datums_lidz` date DEFAULT NULL COMMENT 'Amata laiks lidz',
  `id` int(11) NOT NULL,
  `id_persona` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table ` epasti`
--

CREATE TABLE ` epasti` (
  `epasts` varchar(30) NOT NULL COMMENT 'epasts',
  `tips` varchar(30) DEFAULT NULL COMMENT 'Epasta tips',
  `id` int(11) NOT NULL,
  `id_persona` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `konti`
--

CREATE TABLE `konti` (
  `konts` varchar(21) NOT NULL COMMENT 'Bankas konts',
  `numurs` varchar(20) NOT NULL COMMENT 'Darba līguma konts',
  `piezimes` varchar(200) DEFAULT NULL COMMENT 'Piezīmes',
  `id` int(11) NOT NULL,
  `id_persona` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `persona`
--

CREATE TABLE `persona` (
  `vards` varchar(20) NOT NULL COMMENT 'Vārds',
  `uzvards` varchar(30) NOT NULL COMMENT 'Uzvārds',
  `datums` date NOT NULL COMMENT 'Dzimšanas kods',
  `kods` int(11) DEFAULT NULL COMMENT 'Personas kods',
  `id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table ` talruni`
--

CREATE TABLE ` talruni` (
  `talrunis` int(30) NOT NULL COMMENT 'talrunis',
  `tips` varchar(30) DEFAULT NULL COMMENT 'Talruna tips',
  `id` int(11) NOT NULL,
  `id_persona` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `adreses`
--
ALTER TABLE `adreses`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `amati`
--
ALTER TABLE `amati`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table ` epasti`
--
ALTER TABLE ` epasti`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `konti`
--
ALTER TABLE `konti`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `persona`
--
ALTER TABLE `persona`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table ` talruni`
--
ALTER TABLE ` talruni`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `adreses`
--
ALTER TABLE `adreses`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `amati`
--
ALTER TABLE `amati`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table ` epasti`
--
ALTER TABLE ` epasti`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `konti`
--
ALTER TABLE `konti`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `persona`
--
ALTER TABLE `persona`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table ` talruni`
--
ALTER TABLE ` talruni`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;

/*!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 */;
