All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.anrisoftware.sscontrol.mail.postfix.mysqlstorage.linux.tables.stg Maven / Gradle / Ivy

There is a newer version: 1.0-alpha-4
Show newest version
createAliasesTable(args) ::= <<








 --user= --password= -t \<\<'STOP'
USE ;
CREATE TABLE IF NOT EXISTS `` (
`` smallint(3) NOT NULL auto_increment,
`` varchar(120) NOT NULL default '',
`` varchar(120) NOT NULL default '',
`` tinyint(1) NOT NULL default '1',
PRIMARY KEY (``));


\q
STOP
>>

createDomainsTable(args) ::= <<








 --user= --password= -t \<\<'STOP'
USE ;
CREATE TABLE IF NOT EXISTS `` (
`` smallint(6) NOT NULL auto_increment,
`` varchar(120) NOT NULL default '',
`` varchar(120) NOT NULL default 'virtual:',
`` tinyint(1) NOT NULL default '1',
PRIMARY KEY (``) ) ;


\q
STOP
>>

createUsersTable(args) ::= <<





















 --user= --password= -t \<\<'STOP'
USE ;
CREATE TABLE IF NOT EXISTS `` (
`` smallint(6) NOT NULL auto_increment,
`` varchar(128) NOT NULL default '',
`` varchar(128) NOT NULL default '',
`` smallint(5) unsigned NOT NULL default '',
`` smallint(5) unsigned NOT NULL default '',
`` varchar(255) NOT NULL default '',
`` varchar(255) NOT NULL,
`` tinyint(3) unsigned NOT NULL default '1',
`` tinyint(3) unsigned NOT NULL default '1',
`` varchar(128) NOT NULL default 'ChangeMe',
`` varchar(128) NOT NULL default 'sdtrusfX0Jj66',
`` varchar(255) NOT NULL default '',
`` varchar(128) NOT NULL default '',
`` varchar(128) NOT NULL default '',
PRIMARY KEY (``));


\q
STOP
>>

createIndexIfNotExists(table, column) ::= <<
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ANSI';
DROP PROCEDURE IF EXISTS create_index;
DELIMITER $$
CREATE PROCEDURE create_index()
BEGIN
    DECLARE indexexists BIGINT DEFAULT 0;
    SELECT COUNT(*) INTO indexexists FROM information_schema.statistics
        WHERE TABLE_SCHEMA = DATABASE()
        AND table_name = '' AND index_name = '_
_index'; IF indexexists = 0 THEN CREATE UNIQUE INDEX `_
_index` ON `
` (``); END IF; END ;$$ DELIMITER ; CALL create_index(); DROP PROCEDURE IF EXISTS create_index; SET SQL_MODE=@OLD_SQL_MODE; >>