CREATE TABLE IF NOT EXISTS `#__sj_newsletter_email` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,

`email` VARCHAR(255)  NOT NULL ,
`checked_out` INT(11)  NOT NULL ,
`checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`ordering` INT(11)  NOT NULL ,
`state` TINYINT(1)  NOT NULL ,
`created_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`confirm_mail` TINYINT(1)  NOT NULL ,
PRIMARY KEY (`id`)
) DEFAULT COLLATE=utf8_general_ci;

CREATE TABLE IF NOT EXISTS `#__sj_newsletter_email_content` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,

`title` VARCHAR(255)  NOT NULL ,
`email_send_from_name` VARCHAR(255)  NOT NULL ,
`email_customer_subject` VARCHAR(255)  NOT NULL ,
`email_customer_body` TEXT NOT NULL ,
`ordering` INT(11)  NOT NULL ,
`state` TINYINT(1)  NOT NULL ,
`checked_out` INT(11)  NOT NULL ,
`checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`created_by` INT(11)  NOT NULL ,
PRIMARY KEY (`id`)
) DEFAULT COLLATE=utf8_general_ci;

CREATE TABLE IF NOT EXISTS `#__sj_newsletter_email_content_id` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`id_content_mail` INT(11)  NOT NULL ,
PRIMARY KEY (`id`)
) DEFAULT COLLATE=utf8_general_ci;

INSERT INTO `#__sj_newsletter_email_content_id` (`id`, `id_content_mail`) VALUES(1, 0);

