SQL dump - Sartani/ajanvaraus GitHub Wiki
Here's the dump for initiliasing the database.
https://www.phpmyadmin.net/
-- phpMyAdmin SQL Dump -- version 4.6.5.2 ---- Host: 127.0.0.1 -- Generation Time: 01.10.2017 klo 21:46 -- Palvelimen versio: 10.1.21-MariaDB -- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00";
ajanvaraus
--
-- Database: calendar_dates
--
-- Rakenne taululle CREATE TABLE calendar_dates
(
calendar_id
int(11) NOT NULL,
date
date NOT NULL,
weekday
varchar(3) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
calendar_options
--
-- Rakenne taululle CREATE TABLE calendar_options
(
calendar_id
int(11) NOT NULL,
start_date
date NOT NULL,
end_date
date NOT NULL,
start_time
time NOT NULL,
end_time
time NOT NULL,
break_start_time
time DEFAULT NULL,
break_end_time
time DEFAULT NULL,
reservable_days
varchar(27) NOT NULL,
calendar_name
varchar(64) NOT NULL,
reservation_intervals
int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
calendar_reservations
--
-- Rakenne taululle CREATE TABLE calendar_reservations
(
calendar_id
int(11) NOT NULL,
reservation_date
date NOT NULL,
reservation_time
time NOT NULL,
reserver_name
varchar(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
users
--
-- Rakenne taululle CREATE TABLE users
(
user_id
int(11) NOT NULL,
user_name
varchar(255) COLLATE utf8_unicode_ci NOT NULL,
user_password
varchar(255) COLLATE utf8_unicode_ci NOT NULL,
user_email
varchar(255) COLLATE utf8_unicode_ci NOT NULL,
user_level
int(11) NOT NULL DEFAULT '1' COMMENT 'Käyttäjille tasot'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Käyttäjän tiedot';
users
--
-- Vedos taulusta INSERT INTO users
(user_id
, user_name
, user_password
, user_email
, user_level
) VALUES
(1, 'Admin', 'sanasalainen', '[email protected]', 1);
-- -- Indexes for dumped tables
calendar_options
--
-- Indexes for table ALTER TABLE calendar_options
ADD PRIMARY KEY (calendar_id
),
ADD UNIQUE KEY calendar_name
(calendar_name
);
calendar_reservations
--
-- Indexes for table ALTER TABLE calendar_reservations
ADD KEY calendar_id
(calendar_id
);
users
--
-- Indexes for table ALTER TABLE users
ADD PRIMARY KEY (user_id
);
-- -- AUTO_INCREMENT for dumped tables
calendar_options
--
-- AUTO_INCREMENT for table calendar_options
MODIFY calendar_id
int(11) NOT NULL AUTO_INCREMENT;
ALTER TABLE users
-- AUTO_INCREMENT for table ALTER TABLE users
MODIFY user_id
int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;