Removed rsc/db directory (database structure must only located into assets/sql).
This commit is contained in:
parent
d23ec0483c
commit
27fa6a80c2
2 changed files with 0 additions and 238 deletions
|
@ -1,52 +0,0 @@
|
||||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
|
||||||
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 */;
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `ea_roles` (`id`, `name`, `slug`, `is_admin`, `appointments`, `customers`, `services`, `users`, `system_settings`, `user_settings`) VALUES
|
|
||||||
(1, 'Administrator', 'admin', 1, 15, 15, 15, 15, 15, 15),
|
|
||||||
(2, 'Provider', 'provider', 0, 15, 15, 0, 0, 0, 15),
|
|
||||||
(3, 'Customer', 'customer', 0, 0, 0, 0, 0, 0, 0),
|
|
||||||
(4, 'Secretary', 'secretary', 0, 15, 15, 0, 0, 0, 15);
|
|
||||||
|
|
||||||
INSERT INTO `ea_secretaries_providers` (`id_users_secretary`, `id_users_provider`) VALUES
|
|
||||||
(87, 85);
|
|
||||||
|
|
||||||
INSERT INTO `ea_services` (`id`, `name`, `duration`, `price`, `currency`, `description`, `availabilities_type`, `attendants_number`, `id_service_categories`) VALUES
|
|
||||||
(13, 'Test Service', 30, '50.00', 'Euro', 'This is a test service automatically inserted by the installer.', 'flexible', 1, NULL);
|
|
||||||
|
|
||||||
INSERT INTO `ea_services_providers` (`id_users`, `id_services`) VALUES
|
|
||||||
(85, 13);
|
|
||||||
|
|
||||||
INSERT INTO `ea_service_categories` (`id`, `name`, `description`) VALUES
|
|
||||||
(24, 'Test Category', 'This is a test service category.');
|
|
||||||
|
|
||||||
INSERT INTO `ea_settings` (`id`, `name`, `value`) VALUES
|
|
||||||
(16, 'company_working_plan', '{"monday":{"start":"09:00","end":"18:00","breaks":[{"start":"11:20","end":"11:30"},{"start":"14:30","end":"15:00"}]},"tuesday":{"start":"09:00","end":"18:00","breaks":[{"start":"11:20","end":"11:30"},{"start":"14:30","end":"15:00"}]},"wednesday":{"start":"09:00","end":"18:00","breaks":[{"start":"11:20","end":"11:30"},{"start":"14:30","end":"15:00"}]},"thursday":{"start":"09:00","end":"18:00","breaks":[{"start":"11:20","end":"11:30"},{"start":"14:30","end":"15:00"}]},"friday":{"start":"09:00","end":"18:00","breaks":[{"start":"11:20","end":"11:30"},{"start":"14:30","end":"15:00"}]},"saturday":{"start":"09:00","end":"18:00","breaks":[{"start":"11:20","end":"11:30"},{"start":"14:30","end":"15:00"}]},"sunday":{"start":"09:00","end":"18:00","breaks":[{"start":"11:20","end":"11:30"},{"start":"14:30","end":"15:00"}]}}'),
|
|
||||||
(17, 'book_advance_timeout', '30'),
|
|
||||||
(18, 'google_analytics_code', ''),
|
|
||||||
(19, 'customer_notifications', '1'),
|
|
||||||
(20, 'date_format', 'DMY'),
|
|
||||||
(21, 'require_captcha', '0'),
|
|
||||||
(22, 'company_name', 'JD & Co'),
|
|
||||||
(23, 'company_email', 'john@doe12345.com'),
|
|
||||||
(24, 'company_link', 'http://doe12345.com');
|
|
||||||
|
|
||||||
INSERT INTO `ea_users` (`id`, `first_name`, `last_name`, `email`, `mobile_number`, `phone_number`, `address`, `city`, `state`, `zip_code`, `notes`, `id_roles`) VALUES
|
|
||||||
(84, 'John', 'Doe', 'john@doe12345.com', '123123123', '123123123', 'Some Str 123', 'Some City', 'Some State', '12345', 'This is a test administrator.', 1),
|
|
||||||
(85, 'Jane', 'Doe', 'jane@doe12345.com', '0123456789', '0123456789', 'Some Str 123', 'Some City', 'Some State', '12345', 'This is a test provider', 2),
|
|
||||||
(86, 'Chris', 'Doe', 'chris@doe12345.com', NULL, '123123123', 'Some Str 123', 'Some City', NULL, '12345', 'This is a test customer.', 3),
|
|
||||||
(87, 'Chloe', 'Doe', 'chloe@doe12345.com', '123123123', '123123123', 'Some Str 123', 'Some City', 'Some State', '12345', 'This is a test secretary.', 4);
|
|
||||||
|
|
||||||
INSERT INTO `ea_user_settings` (`id_users`, `username`, `password`, `salt`, `working_plan`, `notifications`, `google_sync`, `google_token`, `google_calendar`, `sync_past_days`, `sync_future_days`, `calendar_view`) VALUES
|
|
||||||
(84, 'administrator', 'c1871d3852f8b78503c5e4f585f3979d0580b4d0339533ae5b55abbe3dba7a4b', '703006e3a7c61db01c943eda81b50ac4ca567e1e61fd677b6a8b431c8bd95eeb', NULL, 0, 0, NULL, NULL, 5, 5, 'default'),
|
|
||||||
(85, 'jane@doe12345.com', '29cc4447507f0ea740a5d666944e997059b02cc0a968fa3f29eb5574cc1df2e7', 'f7b509c4b37f734ed1c3c65466b62843979bf4a354c3c3a1ab4752f9399df95c', '{"monday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"tuesday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"wednesday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"thursday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"friday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"saturday":null,"sunday":null}', 0, 0, NULL, NULL, 5, 5, 'default'),
|
|
||||||
(87, 'chloe@doe12345.com', '2ad09a6c7b100048a48c380290206c35d953ed224c706d6f61d2198a9413c115', '8701d60910fb5994d4700f8057cebb16e94326d397241c7baac7c9b9c61012e6', NULL, 0, 0, NULL, NULL, 5, 5, 'default');
|
|
||||||
|
|
||||||
/*!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 */;
|
|
|
@ -1,186 +0,0 @@
|
||||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
|
||||||
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 */;
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE `ea_appointments` (
|
|
||||||
`id` INT(11) AUTO_INCREMENT NOT NULL,
|
|
||||||
`book_datetime` DATETIME DEFAULT NULL,
|
|
||||||
`start_datetime` DATETIME DEFAULT NULL,
|
|
||||||
`end_datetime` DATETIME DEFAULT NULL,
|
|
||||||
`notes` TEXT,
|
|
||||||
`hash` TEXT,
|
|
||||||
`is_unavailable` TINYINT(4) DEFAULT '0',
|
|
||||||
`id_users_provider` INT(11) DEFAULT NULL,
|
|
||||||
`id_users_customer` INT(11) DEFAULT NULL,
|
|
||||||
`id_services` INT(11) DEFAULT NULL,
|
|
||||||
`id_google_calendar` TEXT,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
KEY `id_users_customer` (`id_users_customer`),
|
|
||||||
KEY `id_services` (`id_services`),
|
|
||||||
KEY `id_users_provider` (`id_users_provider`)
|
|
||||||
)
|
|
||||||
ENGINE = InnoDB
|
|
||||||
DEFAULT CHARSET = utf8;
|
|
||||||
|
|
||||||
CREATE TABLE `ea_migrations` (
|
|
||||||
`version` INT(11) NOT NULL
|
|
||||||
)
|
|
||||||
ENGINE = InnoDB
|
|
||||||
DEFAULT CHARSET = utf8;
|
|
||||||
|
|
||||||
CREATE TABLE `ea_roles` (
|
|
||||||
`id` INT(11) AUTO_INCREMENT NOT NULL,
|
|
||||||
`name` VARCHAR(256) DEFAULT NULL,
|
|
||||||
`slug` VARCHAR(256) DEFAULT NULL,
|
|
||||||
`is_admin` TINYINT(4) DEFAULT NULL,
|
|
||||||
`appointments` INT(11) DEFAULT NULL,
|
|
||||||
`customers` INT(11) DEFAULT NULL,
|
|
||||||
`services` INT(11) DEFAULT NULL,
|
|
||||||
`users` INT(11) DEFAULT NULL,
|
|
||||||
`system_settings` INT(11) DEFAULT NULL,
|
|
||||||
`user_settings` INT(11) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
)
|
|
||||||
ENGINE = InnoDB
|
|
||||||
DEFAULT CHARSET = utf8;
|
|
||||||
|
|
||||||
CREATE TABLE `ea_secretaries_providers` (
|
|
||||||
`id_users_secretary` INT(11) NOT NULL,
|
|
||||||
`id_users_provider` INT(11) NOT NULL,
|
|
||||||
PRIMARY KEY (`id_users_secretary`, `id_users_provider`),
|
|
||||||
KEY `fk_ea_secretaries_providers_1` (`id_users_secretary`),
|
|
||||||
KEY `fk_ea_secretaries_providers_2` (`id_users_provider`)
|
|
||||||
)
|
|
||||||
ENGINE = InnoDB
|
|
||||||
DEFAULT CHARSET = utf8;
|
|
||||||
|
|
||||||
CREATE TABLE `ea_services` (
|
|
||||||
`id` INT(11) AUTO_INCREMENT NOT NULL,
|
|
||||||
`name` VARCHAR(256) DEFAULT NULL,
|
|
||||||
`duration` INT(11) DEFAULT NULL,
|
|
||||||
`price` DECIMAL(10, 2) DEFAULT NULL,
|
|
||||||
`currency` VARCHAR(32) DEFAULT NULL,
|
|
||||||
`description` TEXT,
|
|
||||||
`availabilities_type` VARCHAR(32) DEFAULT 'flexible',
|
|
||||||
`attendants_number` INT(11) DEFAULT '1',
|
|
||||||
`id_service_categories` INT(11) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
KEY `id_service_categories` (`id_service_categories`)
|
|
||||||
)
|
|
||||||
ENGINE = InnoDB
|
|
||||||
DEFAULT CHARSET = utf8;
|
|
||||||
|
|
||||||
CREATE TABLE `ea_services_providers` (
|
|
||||||
`id_users` INT(11) NOT NULL,
|
|
||||||
`id_services` INT(11) NOT NULL,
|
|
||||||
PRIMARY KEY (`id_users`, `id_services`),
|
|
||||||
KEY `id_services` (`id_services`)
|
|
||||||
)
|
|
||||||
ENGINE = InnoDB
|
|
||||||
DEFAULT CHARSET = utf8;
|
|
||||||
|
|
||||||
CREATE TABLE `ea_service_categories` (
|
|
||||||
`id` INT(11) AUTO_INCREMENT NOT NULL,
|
|
||||||
`name` VARCHAR(256) DEFAULT NULL,
|
|
||||||
`description` TEXT,
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
)
|
|
||||||
ENGINE = InnoDB
|
|
||||||
DEFAULT CHARSET = utf8;
|
|
||||||
|
|
||||||
CREATE TABLE `ea_settings` (
|
|
||||||
`id` INT(11) AUTO_INCREMENT NOT NULL,
|
|
||||||
`name` VARCHAR(512) DEFAULT NULL,
|
|
||||||
`value` TEXT,
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
)
|
|
||||||
ENGINE = InnoDB
|
|
||||||
DEFAULT CHARSET = utf8;
|
|
||||||
|
|
||||||
CREATE TABLE `ea_users` (
|
|
||||||
`id` INT(11) AUTO_INCREMENT NOT NULL,
|
|
||||||
`first_name` VARCHAR(256) DEFAULT NULL,
|
|
||||||
`last_name` VARCHAR(512) DEFAULT NULL,
|
|
||||||
`email` VARCHAR(512) DEFAULT NULL,
|
|
||||||
`mobile_number` VARCHAR(128) DEFAULT NULL,
|
|
||||||
`phone_number` VARCHAR(128) DEFAULT NULL,
|
|
||||||
`address` VARCHAR(256) DEFAULT NULL,
|
|
||||||
`city` VARCHAR(256) DEFAULT NULL,
|
|
||||||
`state` VARCHAR(128) DEFAULT NULL,
|
|
||||||
`zip_code` VARCHAR(64) DEFAULT NULL,
|
|
||||||
`notes` TEXT,
|
|
||||||
`id_roles` INT(11) NOT NULL,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
KEY `id_roles` (`id_roles`)
|
|
||||||
)
|
|
||||||
ENGINE = InnoDB
|
|
||||||
DEFAULT CHARSET = utf8;
|
|
||||||
|
|
||||||
CREATE TABLE `ea_user_settings` (
|
|
||||||
`id_users` INT(11) NOT NULL,
|
|
||||||
`username` VARCHAR(256) DEFAULT NULL,
|
|
||||||
`password` VARCHAR(512) DEFAULT NULL,
|
|
||||||
`salt` VARCHAR(512) DEFAULT NULL,
|
|
||||||
`working_plan` TEXT,
|
|
||||||
`notifications` TINYINT(4) DEFAULT '0',
|
|
||||||
`google_sync` TINYINT(4) DEFAULT '0',
|
|
||||||
`google_token` TEXT,
|
|
||||||
`google_calendar` VARCHAR(128) DEFAULT NULL,
|
|
||||||
`sync_past_days` INT(11) DEFAULT '5',
|
|
||||||
`sync_future_days` INT(11) DEFAULT '5',
|
|
||||||
`calendar_view` VARCHAR(32) DEFAULT 'default',
|
|
||||||
PRIMARY KEY (`id_users`)
|
|
||||||
)
|
|
||||||
ENGINE = InnoDB
|
|
||||||
DEFAULT CHARSET = utf8;
|
|
||||||
|
|
||||||
ALTER TABLE `ea_appointments`
|
|
||||||
ADD CONSTRAINT `ea_appointments_users_customer` FOREIGN KEY (`id_users_customer`) REFERENCES `ea_users` (`id`)
|
|
||||||
ON DELETE CASCADE
|
|
||||||
ON UPDATE CASCADE,
|
|
||||||
ADD CONSTRAINT `ea_appointments_services` FOREIGN KEY (`id_services`) REFERENCES `ea_services` (`id`)
|
|
||||||
ON DELETE CASCADE
|
|
||||||
ON UPDATE CASCADE,
|
|
||||||
ADD CONSTRAINT `ea_appointments_users_provider` FOREIGN KEY (`id_users_provider`) REFERENCES `ea_users` (`id`)
|
|
||||||
ON DELETE CASCADE
|
|
||||||
ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
ALTER TABLE `ea_secretaries_providers`
|
|
||||||
ADD CONSTRAINT `ea_secretaries_users_secretary` FOREIGN KEY (`id_users_secretary`) REFERENCES `ea_users` (`id`)
|
|
||||||
ON DELETE CASCADE
|
|
||||||
ON UPDATE CASCADE,
|
|
||||||
ADD CONSTRAINT `ea_secretaries_users_provider` FOREIGN KEY (`id_users_provider`) REFERENCES `ea_users` (`id`)
|
|
||||||
ON DELETE CASCADE
|
|
||||||
ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
ALTER TABLE `ea_services`
|
|
||||||
ADD CONSTRAINT `ea_services_service_categories` FOREIGN KEY (`id_service_categories`) REFERENCES `ea_service_categories` (`id`)
|
|
||||||
ON DELETE SET NULL
|
|
||||||
ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
ALTER TABLE `ea_services_providers`
|
|
||||||
ADD CONSTRAINT `ea_services_providers_users_provider` FOREIGN KEY (`id_users`) REFERENCES `ea_users` (`id`)
|
|
||||||
ON DELETE CASCADE
|
|
||||||
ON UPDATE CASCADE,
|
|
||||||
ADD CONSTRAINT `ea_services_providers_services` FOREIGN KEY (`id_services`) REFERENCES `ea_services` (`id`)
|
|
||||||
ON DELETE CASCADE
|
|
||||||
ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
ALTER TABLE `ea_users`
|
|
||||||
ADD CONSTRAINT `ea_users_roles` FOREIGN KEY (`id_roles`) REFERENCES `ea_roles` (`id`)
|
|
||||||
ON DELETE CASCADE
|
|
||||||
ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
ALTER TABLE `ea_user_settings`
|
|
||||||
ADD CONSTRAINT `ea_user_settings_users` FOREIGN KEY (`id_users`) REFERENCES `ea_users` (`id`)
|
|
||||||
ON DELETE CASCADE
|
|
||||||
ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
/*!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 */;
|
|
Loading…
Reference in a new issue