-- phpMyAdmin SQL Dump
-- version 3.2.3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 17, 2013 at 09:14 AM
-- Server version: 5.1.40
-- PHP Version: 5.3.13
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `social`
--
-- --------------------------------------------------------
--
-- Table structure for table `prefix_role_assignment`
--
CREATE TABLE IF NOT EXISTS `prefix_role_assignment` (
`nameitem` varchar(32) NOT NULL,
`user_id` int(10) unsigned NOT NULL,
`access` tinyint(4) NOT NULL DEFAULT '0' COMMENT '1 - r | 2 - u| 4 - c | 8 - d ',
PRIMARY KEY (`nameitem`,`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `prefix_role_assignment`
--
-- --------------------------------------------------------
--
-- Table structure for table `prefix_role_child`
--
CREATE TABLE IF NOT EXISTS `prefix_role_child` (
`parent` varchar(32) NOT NULL,
`child` varchar(32) NOT NULL,
PRIMARY KEY (`parent`,`child`),
KEY `child` (`child`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `prefix_role_child`
--
-- --------------------------------------------------------
--
-- Table structure for table `prefix_role_item`
--
CREATE TABLE IF NOT EXISTS `prefix_role_item` (
`name` varchar(32) NOT NULL,
`type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0- role 1 - group 2 - comand',
`description` text NOT NULL,
`accessory` text COMMENT 'принадлежность',
PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `prefix_role_item`
--
--
-- Constraints for dumped tables
--
--
-- Constraints for table `prefix_role_assignment`
--
ALTER TABLE `prefix_role_assignment`
ADD CONSTRAINT `prefix_role_assignment_ibfk_1` FOREIGN KEY (`nameitem`) REFERENCES `prefix_role_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `prefix_role_child`
--
ALTER TABLE `prefix_role_child`
ADD CONSTRAINT `prefix_role_child_ibfk_1` FOREIGN KEY (`parent`) REFERENCES `prefix_role_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `prefix_role_child_ibfk_2` FOREIGN KEY (`child`) REFERENCES `prefix_role_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE;
|