Files
code-cegled/queries/authority_20190725.sql
Tóth Richárd e0e887542b small edits
2019-07-30 13:54:27 +02:00

33 lines
1.6 KiB
SQL

CREATE TABLE `authority` (
`a_id` INT NOT NULL AUTO_INCREMENT,
`a_name` VARCHAR(126) CHARACTER SET 'utf8' COLLATE 'utf8_hungarian_ci' NOT NULL,
`a_title` VARCHAR(126) CHARACTER SET 'utf8' COLLATE 'utf8_hungarian_ci' NOT NULL,
PRIMARY KEY (`a_id`));
CREATE TABLE `user_authority` (
`ua_id` INT NOT NULL AUTO_INCREMENT,
`ua_user_kid_uk_id` INT NOT NULL,
`ua_authority_a_id` INT NOT NULL,
PRIMARY KEY (`ua_id`),
INDEX `index2` (`ua_user_kid_uk_id` ASC),
INDEX `index3` (`ua_authority_a_id` ASC));
CREATE TABLE `user_authority` (
`ua_id` int(11) NOT NULL AUTO_INCREMENT,
`ua_user_kid_uk_id` int(11) NOT NULL,
`ua_authority_a_id` int(11) DEFAULT NULL,
PRIMARY KEY (`ua_id`),
INDEX `index2` (`ua_user_kid_uk_id` ASC),
INDEX `index3` (`ua_authority_a_id` ASC));
INSERT INTO `authority` (`a_name`, `a_title`) VALUES ('admin', 'Admin');
INSERT INTO `authority` (`a_name`, `a_title`) VALUES ('members', 'Tagok');
INSERT INTO `authority` (`a_name`, `a_title`) VALUES ('trainings', 'Edzések');
INSERT INTO `authority` (`a_name`, `a_title`) VALUES ('presence', 'Jelenlét');
INSERT INTO `authority` (`a_name`, `a_title`) VALUES ('coaches', 'Edzők');
INSERT INTO `authority` (`a_name`, `a_title`) VALUES ('money_deposit', 'Befizetések');
INSERT INTO `authority` (`a_name`, `a_title`) VALUES ('money_expense', 'Kiadások');
INSERT INTO `authority` (`a_name`, `a_title`) VALUES ('money_income', 'Bevételek');
INSERT INTO `authority` (`a_name`, `a_title`) VALUES ('news', 'Hírek');
INSERT INTO `authority` (`a_name`, `a_title`) VALUES ('settings', 'Beállítások');