Dziolas/TAI---wypozyczalnia — comment on commit b39ad6016e5942146be9be3427c155143ef917c0
File:  line 0
By Dziolas:

Skrypt z nowymi tabelami w bd. Zawiera trochę danych, ale tabele acl'a będzie trzeba uzupełnić.

-- phpMyAdmin SQL Dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Czas wygenerowania: 18 Lis 2011, 11:37
-- Wersja serwera: 5.1.41
-- Wersja PHP: 5.3.1

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

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

--
-- Baza danych: `film_hire`
--

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

--
-- Struktura tabeli dla `acos`
--

CREATE TABLE IF NOT EXISTS `acos` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`parent_id` int(10) DEFAULT NULL,
`model` varchar(255) DEFAULT NULL,
`foreign_key` int(10) DEFAULT NULL,
`alias` varchar(255) DEFAULT NULL,
`lft` int(10) DEFAULT NULL,
`rght` int(10) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Zrzut danych tabeli `acos`
--

INSERT INTO `acos` (`id`, `parent_id`, `model`, `foreign_key`, `alias`, `lft`, `rght`) VALUES
(1, NULL, NULL, NULL, 'controllers', 1, 2),
(2, NULL, NULL, NULL, 'controllers', 3, 42),
(3, 2, NULL, NULL, 'Users', 4, 17),
(4, 3, NULL, NULL, 'add', 5, 6),
(5, 3, NULL, NULL, 'edit', 7, 8),
(6, 3, NULL, NULL, 'delete', 9, 10),
(8, 2, NULL, NULL, 'Roles', 18, 25),
(9, 8, NULL, NULL, 'add', 19, 20),
(10, 8, NULL, NULL, 'edit', 21, 22),
(11, 8, NULL, NULL, 'delete', 23, 24),
(12, 2, NULL, NULL, 'Clients', 26, 33),
(13, 12, NULL, NULL, 'add', 27, 28),
(14, 12, NULL, NULL, 'delete', 29, 30),
(15, 12, NULL, NULL, 'edit', 31, 32),
(16, 2, NULL, NULL, 'Copies', 34, 41),
(17, 16, NULL, NULL, 'add', 35, 36),
(18, 16, NULL, NULL, 'edit', 37, 38),
(19, 16, NULL, NULL, 'delete', 39, 40),
(20, 3, NULL, NULL, 'login', 13, 14),
(21, 3, NULL, NULL, 'logout', 15, 16);

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

--
-- Struktura tabeli dla `aros`
--

CREATE TABLE IF NOT EXISTS `aros` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`parent_id` int(10) DEFAULT NULL,
`model` varchar(255) DEFAULT NULL,
`foreign_key` int(10) DEFAULT NULL,
`alias` varchar(255) DEFAULT NULL,
`lft` int(10) DEFAULT NULL,
`rght` int(10) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Zrzut danych tabeli `aros`
--

INSERT INTO `aros` (`id`, `parent_id`, `model`, `foreign_key`, `alias`, `lft`, `rght`) VALUES
(1, NULL, 'Role', 1, NULL, 1, 6),
(2, NULL, 'Role', 2, NULL, 7, 10),
(3, NULL, 'Role', 3, NULL, 11, 12),
(4, 2, 'User', 1, NULL, 8, 9),
(5, 1, 'User', 2, NULL, 2, 3),
(6, 1, 'User', 3, NULL, 4, 5);

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

--
-- Struktura tabeli dla `aros_acos`
--

CREATE TABLE IF NOT EXISTS `aros_acos` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`aro_id` int(10) NOT NULL,
`aco_id` int(10) NOT NULL,
`_create` varchar(2) NOT NULL DEFAULT '0',
`_read` varchar(2) NOT NULL DEFAULT '0',
`_update` varchar(2) NOT NULL DEFAULT '0',
`_delete` varchar(2) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `ARO_ACO_KEY` (`aro_id`,`aco_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Zrzut danych tabeli `aros_acos`
--

INSERT INTO `aros_acos` (`id`, `aro_id`, `aco_id`, `_create`, `_read`, `_update`, `_delete`) VALUES
(1, 1, 2, '1', '1', '1', '1'),
(2, 2, 2, '-1', '-1', '-1', '-1'),
(3, 2, 3, '1', '1', '1', '1'),
(4, 3, 2, '-1', '-1', '-1', '-1'),
(5, 2, 8, '1', '1', '1', '1');

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

--
-- Struktura tabeli dla `roles`
--

CREATE TABLE IF NOT EXISTS `roles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Zrzut danych tabeli `roles`
--

INSERT INTO `roles` (`id`, `name`) VALUES
(1, 'admin'),
(2, 'manager'),
(3, 'user');

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

--
-- Struktura tabeli dla `users`
--

CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`e-mail` varchar(30) NOT NULL,
`password` varchar(60) NOT NULL,
`role_id` int(3) NOT NULL DEFAULT '1',
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `e-mail` (`e-mail`),
KEY `role_id` (`role_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Zrzut danych tabeli `users`
--

INSERT INTO `users` (`id`, `e-mail`, `password`, `role_id`, `created`, `modified`) VALUES
(1, 'wziolek2@wp.pl', 'a90b04dde3362d8c11e7367424faa70fc6956369', 2, '2011-11-15 09:50:31', '2011-11-15 09:50:31'),
(2, 'wziolek@wp.pl', 'a90b04dde3362d8c11e7367424faa70fc6956369', 1, '2011-11-15 09:50:39', '2011-11-15 09:50:39'),
(3, 'aaa@aaa.pl', 'a90b04dde3362d8c11e7367424faa70fc6956369', 1, '2011-11-17 13:03:43', '2011-11-17 13:03:43');

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