Skip to content
Snippets Groups Projects
Verified Commit c078f9b4 authored by Kevin Cristiano's avatar Kevin Cristiano :earth_americas:
Browse files

add standalone sql directory

parent a11b37fc
No related branches found
No related tags found
No related merge requests found
-- +--------------------------------------------------------------------+
-- | Copyright CiviCRM LLC. All rights reserved. |
-- | |
-- | This work is published under the GNU AGPLv3 license with some |
-- | permitted exceptions and without any warranty. For full license |
-- | and copyright information, see https://civicrm.org/licensing |
-- +--------------------------------------------------------------------+
--
-- Generated from schema.tpl
-- DO NOT EDIT. Generated by CRM_Core_CodeGen
--
-- /*******************************************************
-- *
-- * Clean up the existing tables - this section generated from drop.tpl
-- *
-- *******************************************************/
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `civicrm_user`;
DROP TABLE IF EXISTS `civicrm_role`;
SET FOREIGN_KEY_CHECKS=1;
-- /*******************************************************
-- *
-- * Create new tables
-- *
-- *******************************************************/
-- /*******************************************************
-- *
-- * civicrm_role
-- *
-- * A Role holds a set of permissions. Roles may be granted to Users.
-- *
-- *******************************************************/
CREATE TABLE `civicrm_role` (
`id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique Role ID',
`name` varchar(60) NOT NULL COMMENT 'Machine name for this role',
`label` varchar(128) NOT NULL COMMENT 'Human friendly name for this role',
`permissions` text NOT NULL COMMENT 'List of permissions granted by this role',
`is_active` tinyint DEFAULT 1 COMMENT 'Only active roles grant permissions',
PRIMARY KEY (`id`)
)
ENGINE=InnoDB;
-- /*******************************************************
-- *
-- * civicrm_user
-- *
-- * A standalone user account
-- *
-- *******************************************************/
CREATE TABLE `civicrm_user` (
`id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique User ID',
`contact_id` int unsigned COMMENT 'FK to Contact - possibly redundant',
`username` varchar(60) NOT NULL,
`password` varchar(128) NOT NULL COMMENT 'Hashed password',
`email` varchar(255) NOT NULL COMMENT 'Email (e.g. for password resets)',
`roles` varchar(128) COMMENT 'FK to Role',
`when_created` timestamp DEFAULT CURRENT_TIMESTAMP,
`when_last_accessed` timestamp NULL,
`when_updated` timestamp NULL,
`is_active` tinyint NOT NULL DEFAULT 1,
`timezone` varchar(32) NULL COMMENT 'User\'s timezone',
`language` int unsigned COMMENT 'The language for the user.',
PRIMARY KEY (`id`),
UNIQUE INDEX `UI_username`(username),
CONSTRAINT FK_civicrm_user_contact_id FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact`(`id`) ON DELETE CASCADE
)
ENGINE=InnoDB;
-- +--------------------------------------------------------------------+
-- | Copyright CiviCRM LLC. All rights reserved. |
-- | |
-- | This work is published under the GNU AGPLv3 license with some |
-- | permitted exceptions and without any warranty. For full license |
-- | and copyright information, see https://civicrm.org/licensing |
-- +--------------------------------------------------------------------+
--
-- Generated from drop.tpl
-- DO NOT EDIT. Generated by CRM_Core_CodeGen
---- /*******************************************************
-- *
-- * Clean up the existing tables-- *
-- *******************************************************/
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `civicrm_user`;
DROP TABLE IF EXISTS `civicrm_role`;
SET FOREIGN_KEY_CHECKS=1;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment