initial commit
This commit is contained in:
288
db/archive.sql
Normal file
288
db/archive.sql
Normal file
@@ -0,0 +1,288 @@
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `expenses`
|
||||
--
|
||||
|
||||
CREATE TABLE `expenses` (
|
||||
`id` bigint(25) UNSIGNED NOT NULL,
|
||||
`unique_url` varchar(70) DEFAULT NULL,
|
||||
`title` varchar(70) NOT NULL,
|
||||
`currency` varchar(3) DEFAULT NULL,
|
||||
`description` varchar(150) DEFAULT NULL,
|
||||
`language` varchar(3) DEFAULT NULL,
|
||||
`expense_type` char(1) DEFAULT NULL,
|
||||
`create_user` varchar(50) DEFAULT NULL,
|
||||
`update_user` varchar(20) DEFAULT NULL,
|
||||
`status` char(1) DEFAULT NULL,
|
||||
`create_date` datetime DEFAULT NULL,
|
||||
`update_date` int(11) DEFAULT NULL,
|
||||
`default_meal` varchar(17) DEFAULT NULL,
|
||||
`source` tinyint(4) UNSIGNED NOT NULL COMMENT '1=web,2=mobile,3=facebook',
|
||||
`ip` varchar(25) CHARACTER SET utf16 COLLATE utf16_unicode_ci DEFAULT NULL,
|
||||
`user_agent` varchar(80) CHARACTER SET utf16 COLLATE utf16_unicode_ci DEFAULT NULL,
|
||||
`user_id` int(20) UNSIGNED DEFAULT NULL,
|
||||
`custom_categories` varchar(2000) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`version` int(2) NOT NULL DEFAULT '0'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `expense_emails`
|
||||
--
|
||||
|
||||
CREATE TABLE `expense_emails` (
|
||||
`id` bigint(25) UNSIGNED NOT NULL,
|
||||
`unique_url` varchar(70) COLLATE utf16_unicode_ci NOT NULL,
|
||||
`email` varchar(50) COLLATE utf16_unicode_ci NOT NULL,
|
||||
`title` varchar(70) COLLATE utf16_unicode_ci NOT NULL,
|
||||
`count_email_attempt` tinyint(4) NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `family_expenses`
|
||||
--
|
||||
|
||||
CREATE TABLE `family_expenses` (
|
||||
`id` varchar(40) CHARACTER SET utf8 NOT NULL,
|
||||
`expense_id` bigint(20) UNSIGNED NOT NULL,
|
||||
`record_type` char(1) CHARACTER SET utf8 DEFAULT '1' COMMENT '1=expense,2=income',
|
||||
`what` varchar(25) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`category` varchar(30) CHARACTER SET utf8 DEFAULT '1' COMMENT '1=expense,2=income',
|
||||
`create_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`expense_date` int(13) DEFAULT NULL,
|
||||
`expense_date_new` varchar(11) COLLATE utf16_unicode_ci DEFAULT NULL,
|
||||
`update_date` int(13) DEFAULT NULL,
|
||||
`number_of_notes` int(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000',
|
||||
`amount` double DEFAULT NULL,
|
||||
`syn_add_unique_id` varchar(50) COLLATE utf16_unicode_ci DEFAULT NULL,
|
||||
`is_reimbursement` char(1) CHARACTER SET utf8 DEFAULT '0' COMMENT '0=no,1=yes reimbursement',
|
||||
`transaction_type` tinyint(1) DEFAULT '0' COMMENT '1=expense,2=income',
|
||||
`type` char(1) CHARACTER SET utf8 DEFAULT '1',
|
||||
`category_id` smallint(11) DEFAULT NULL,
|
||||
`receipts` varchar(45) COLLATE utf16_unicode_ci DEFAULT NULL,
|
||||
`changed_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`version` int(2) NOT NULL DEFAULT '0',
|
||||
`images` varchar(30) CHARACTER SET utf8 DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `group_expenses`
|
||||
--
|
||||
|
||||
CREATE TABLE `group_expenses` (
|
||||
`id` varchar(40) CHARACTER SET utf8 NOT NULL,
|
||||
`expense_id` bigint(20) UNSIGNED NOT NULL,
|
||||
`expense_type` char(1) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`what` varchar(25) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`create_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`expense_date` int(13) DEFAULT NULL,
|
||||
`expense_date_new` varchar(11) COLLATE utf16_unicode_ci DEFAULT NULL,
|
||||
`update_date` int(13) DEFAULT NULL,
|
||||
`number_of_notes` int(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000',
|
||||
`amount` double DEFAULT NULL,
|
||||
`paid_by_participant_id` varchar(10) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`is_reimbursement` char(1) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`participant_amount` text CHARACTER SET utf8 NOT NULL,
|
||||
`isDetails` tinyint(1) DEFAULT '0',
|
||||
`syn_add_unique_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`type` char(1) CHARACTER SET utf8 DEFAULT '1',
|
||||
`extras` varchar(5) COLLATE utf16_unicode_ci DEFAULT '',
|
||||
`images` varchar(30) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`category_id` smallint(11) DEFAULT NULL,
|
||||
`custom_categories` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
|
||||
`receipts` tinyint(2) DEFAULT NULL,
|
||||
`changed_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`version` int(2) NOT NULL DEFAULT '0'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `group_settings`
|
||||
--
|
||||
|
||||
CREATE TABLE `group_settings` (
|
||||
`id` bigint(20) NOT NULL,
|
||||
`expense_id` bigint(20) NOT NULL,
|
||||
`unique_url` varchar(70) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`categories` text COLLATE utf8_unicode_ci,
|
||||
`version` tinyint(3) NOT NULL DEFAULT '0',
|
||||
`is_restricted_mode` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0=off,1=on'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `logs`
|
||||
--
|
||||
|
||||
CREATE TABLE `logs` (
|
||||
`id` int(30) NOT NULL,
|
||||
`expense_id` int(30) UNSIGNED DEFAULT NULL,
|
||||
`previous_desc` text CHARACTER SET utf8,
|
||||
`previous_paid_by` varchar(15) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`changed_by` varchar(50) COLLATE utf16_unicode_ci DEFAULT NULL,
|
||||
`new_desc` text CHARACTER SET utf8,
|
||||
`create_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `meals`
|
||||
--
|
||||
|
||||
CREATE TABLE `meals` (
|
||||
`id` bigint(25) UNSIGNED NOT NULL,
|
||||
`expense_id` bigint(25) UNSIGNED DEFAULT '0',
|
||||
`create_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`date` int(13) UNSIGNED DEFAULT '0',
|
||||
`date_new` varchar(11) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`version` int(13) UNSIGNED DEFAULT '0',
|
||||
`meal_amount` text COLLATE utf8_unicode_ci,
|
||||
`update_date` int(13) UNSIGNED DEFAULT '0'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `participants`
|
||||
--
|
||||
|
||||
CREATE TABLE `participants` (
|
||||
`id` int(25) UNSIGNED NOT NULL,
|
||||
`participant_id` varchar(10) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`expense_id` int(25) UNSIGNED NOT NULL,
|
||||
`facebook_id` text CHARACTER SET utf8,
|
||||
`name` varchar(20) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`is_creator` char(1) CHARACTER SET utf8 NOT NULL DEFAULT '0',
|
||||
`create_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`version` int(2) NOT NULL DEFAULT '0'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `permissions`
|
||||
--
|
||||
|
||||
CREATE TABLE `permissions` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL,
|
||||
`expense_id` bigint(20) UNSIGNED NOT NULL,
|
||||
`unique_url` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`user_id` bigint(20) UNSIGNED NOT NULL,
|
||||
`role` tinyint(4) NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Indexes for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- Indexes for table `expenses`
|
||||
--
|
||||
ALTER TABLE `expenses`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `expense_emails`
|
||||
--
|
||||
ALTER TABLE `expense_emails`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `family_expenses`
|
||||
--
|
||||
ALTER TABLE `family_expenses`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `expense_id` (`expense_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `group_expenses`
|
||||
--
|
||||
ALTER TABLE `group_expenses`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `group_settings`
|
||||
--
|
||||
ALTER TABLE `group_settings`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD UNIQUE KEY `unique_url` (`unique_url`),
|
||||
ADD UNIQUE KEY `expense_id` (`expense_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `logs`
|
||||
--
|
||||
ALTER TABLE `logs`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `create_date` (`create_date`);
|
||||
|
||||
--
|
||||
-- Indexes for table `meals`
|
||||
--
|
||||
ALTER TABLE `meals`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `expense_id` (`expense_id`),
|
||||
ADD KEY `date` (`date`);
|
||||
|
||||
--
|
||||
-- Indexes for table `participants`
|
||||
--
|
||||
ALTER TABLE `participants`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `expense_id` (`expense_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `permissions`
|
||||
--
|
||||
ALTER TABLE `permissions`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `expenses`
|
||||
--
|
||||
ALTER TABLE `expenses`
|
||||
MODIFY `id` bigint(25) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=897648;
|
||||
--
|
||||
-- AUTO_INCREMENT for table `expense_emails`
|
||||
--
|
||||
ALTER TABLE `expense_emails`
|
||||
MODIFY `id` bigint(25) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9455;
|
||||
--
|
||||
-- AUTO_INCREMENT for table `group_settings`
|
||||
--
|
||||
ALTER TABLE `group_settings`
|
||||
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=856;
|
||||
--
|
||||
-- AUTO_INCREMENT for table `logs`
|
||||
--
|
||||
ALTER TABLE `logs`
|
||||
MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26795;
|
||||
--
|
||||
-- AUTO_INCREMENT for table `meals`
|
||||
--
|
||||
ALTER TABLE `meals`
|
||||
MODIFY `id` bigint(25) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3325;
|
||||
--
|
||||
-- AUTO_INCREMENT for table `participants`
|
||||
--
|
||||
ALTER TABLE `participants`
|
||||
MODIFY `id` int(25) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=44905;
|
||||
--
|
||||
-- AUTO_INCREMENT for table `permissions`
|
||||
--
|
||||
ALTER TABLE `permissions`
|
||||
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1521;
|
||||
|
||||
288
db/backup.sql
Normal file
288
db/backup.sql
Normal file
@@ -0,0 +1,288 @@
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `expenses`
|
||||
--
|
||||
|
||||
CREATE TABLE `backup_expenses` (
|
||||
`id` bigint(25) UNSIGNED NOT NULL,
|
||||
`unique_url` varchar(70) DEFAULT NULL,
|
||||
`title` varchar(70) NOT NULL,
|
||||
`currency` varchar(3) DEFAULT NULL,
|
||||
`description` varchar(150) DEFAULT NULL,
|
||||
`language` varchar(3) DEFAULT NULL,
|
||||
`expense_type` char(1) DEFAULT NULL,
|
||||
`create_user` varchar(50) DEFAULT NULL,
|
||||
`update_user` varchar(20) DEFAULT NULL,
|
||||
`status` char(1) DEFAULT NULL,
|
||||
`create_date` datetime DEFAULT NULL,
|
||||
`update_date` int(11) DEFAULT NULL,
|
||||
`default_meal` varchar(17) DEFAULT NULL,
|
||||
`source` tinyint(4) UNSIGNED NOT NULL COMMENT '1=web,2=mobile,3=facebook',
|
||||
`ip` varchar(25) CHARACTER SET utf16 COLLATE utf16_unicode_ci DEFAULT NULL,
|
||||
`user_agent` varchar(80) CHARACTER SET utf16 COLLATE utf16_unicode_ci DEFAULT NULL,
|
||||
`user_id` int(20) UNSIGNED DEFAULT NULL,
|
||||
`custom_categories` varchar(2000) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`version` int(2) NOT NULL DEFAULT '0'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `expense_emails`
|
||||
--
|
||||
|
||||
CREATE TABLE `backup_expense_emails` (
|
||||
`id` bigint(25) UNSIGNED NOT NULL,
|
||||
`unique_url` varchar(70) COLLATE utf16_unicode_ci NOT NULL,
|
||||
`email` varchar(50) COLLATE utf16_unicode_ci NOT NULL,
|
||||
`title` varchar(70) COLLATE utf16_unicode_ci NOT NULL,
|
||||
`count_email_attempt` tinyint(4) NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `family_expenses`
|
||||
--
|
||||
|
||||
CREATE TABLE `backup_family_expenses` (
|
||||
`id` varchar(40) CHARACTER SET utf8 NOT NULL,
|
||||
`expense_id` bigint(20) UNSIGNED NOT NULL,
|
||||
`record_type` char(1) CHARACTER SET utf8 DEFAULT '1' COMMENT '1=expense,2=income',
|
||||
`what` varchar(25) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`category` varchar(30) CHARACTER SET utf8 DEFAULT '1' COMMENT '1=expense,2=income',
|
||||
`create_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`expense_date` int(13) DEFAULT NULL,
|
||||
`expense_date_new` varchar(11) COLLATE utf16_unicode_ci DEFAULT NULL,
|
||||
`update_date` int(13) DEFAULT NULL,
|
||||
`number_of_notes` int(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000',
|
||||
`amount` double DEFAULT NULL,
|
||||
`syn_add_unique_id` varchar(50) COLLATE utf16_unicode_ci DEFAULT NULL,
|
||||
`is_reimbursement` char(1) CHARACTER SET utf8 DEFAULT '0' COMMENT '0=no,1=yes reimbursement',
|
||||
`transaction_type` tinyint(1) DEFAULT '0' COMMENT '1=expense,2=income',
|
||||
`type` char(1) CHARACTER SET utf8 DEFAULT '1',
|
||||
`category_id` smallint(11) DEFAULT NULL,
|
||||
`receipts` varchar(45) COLLATE utf16_unicode_ci DEFAULT NULL,
|
||||
`changed_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`version` int(2) NOT NULL DEFAULT '0',
|
||||
`images` varchar(30) CHARACTER SET utf8 DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `group_expenses`
|
||||
--
|
||||
|
||||
CREATE TABLE `backup_group_expenses` (
|
||||
`id` varchar(40) CHARACTER SET utf8 NOT NULL,
|
||||
`expense_id` bigint(20) UNSIGNED NOT NULL,
|
||||
`expense_type` char(1) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`what` varchar(25) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`create_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`expense_date` int(13) DEFAULT NULL,
|
||||
`expense_date_new` varchar(11) COLLATE utf16_unicode_ci DEFAULT NULL,
|
||||
`update_date` int(13) DEFAULT NULL,
|
||||
`number_of_notes` int(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000',
|
||||
`amount` double DEFAULT NULL,
|
||||
`paid_by_participant_id` varchar(10) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`is_reimbursement` char(1) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`participant_amount` text CHARACTER SET utf8 NOT NULL,
|
||||
`isDetails` tinyint(1) DEFAULT '0',
|
||||
`syn_add_unique_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`type` char(1) CHARACTER SET utf8 DEFAULT '1',
|
||||
`extras` varchar(5) COLLATE utf16_unicode_ci DEFAULT '',
|
||||
`images` varchar(30) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`category_id` smallint(11) DEFAULT NULL,
|
||||
`custom_categories` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
|
||||
`receipts` tinyint(2) DEFAULT NULL,
|
||||
`changed_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`version` int(2) NOT NULL DEFAULT '0'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `group_settings`
|
||||
--
|
||||
|
||||
CREATE TABLE `backup_group_settings` (
|
||||
`id` bigint(20) NOT NULL,
|
||||
`expense_id` bigint(20) NOT NULL,
|
||||
`unique_url` varchar(70) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`categories` text COLLATE utf8_unicode_ci,
|
||||
`version` tinyint(3) NOT NULL DEFAULT '0',
|
||||
`is_restricted_mode` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0=off,1=on'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `logs`
|
||||
--
|
||||
|
||||
CREATE TABLE `backup_logs` (
|
||||
`id` int(30) NOT NULL,
|
||||
`expense_id` int(30) UNSIGNED DEFAULT NULL,
|
||||
`previous_desc` text CHARACTER SET utf8,
|
||||
`previous_paid_by` varchar(15) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`changed_by` varchar(50) COLLATE utf16_unicode_ci DEFAULT NULL,
|
||||
`new_desc` text CHARACTER SET utf8,
|
||||
`create_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `meals`
|
||||
--
|
||||
|
||||
CREATE TABLE `backup_meals` (
|
||||
`id` bigint(25) UNSIGNED NOT NULL,
|
||||
`expense_id` bigint(25) UNSIGNED DEFAULT '0',
|
||||
`create_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`date` int(13) UNSIGNED DEFAULT '0',
|
||||
`date_new` varchar(11) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`version` int(13) UNSIGNED DEFAULT '0',
|
||||
`meal_amount` text COLLATE utf8_unicode_ci,
|
||||
`update_date` int(13) UNSIGNED DEFAULT '0'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `participants`
|
||||
--
|
||||
|
||||
CREATE TABLE `backup_participants` (
|
||||
`id` int(25) UNSIGNED NOT NULL,
|
||||
`participant_id` varchar(10) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`expense_id` int(25) UNSIGNED NOT NULL,
|
||||
`facebook_id` text CHARACTER SET utf8,
|
||||
`name` varchar(20) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`is_creator` char(1) CHARACTER SET utf8 NOT NULL DEFAULT '0',
|
||||
`create_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`version` int(2) NOT NULL DEFAULT '0'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `permissions`
|
||||
--
|
||||
|
||||
CREATE TABLE `backup_permissions` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL,
|
||||
`expense_id` bigint(20) UNSIGNED NOT NULL,
|
||||
`unique_url` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`user_id` bigint(20) UNSIGNED NOT NULL,
|
||||
`role` tinyint(4) NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Indexes for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- Indexes for table `expenses`
|
||||
--
|
||||
ALTER TABLE `backup_expenses`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `expense_emails`
|
||||
--
|
||||
ALTER TABLE `backup_expense_emails`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `family_expenses`
|
||||
--
|
||||
ALTER TABLE `backup_family_expenses`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `expense_id` (`expense_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `group_expenses`
|
||||
--
|
||||
ALTER TABLE `backup_group_expenses`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `group_settings`
|
||||
--
|
||||
ALTER TABLE `backup_group_settings`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD UNIQUE KEY `unique_url` (`unique_url`),
|
||||
ADD UNIQUE KEY `expense_id` (`expense_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `logs`
|
||||
--
|
||||
ALTER TABLE `backup_logs`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `create_date` (`create_date`);
|
||||
|
||||
--
|
||||
-- Indexes for table `meals`
|
||||
--
|
||||
ALTER TABLE `backup_meals`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `expense_id` (`expense_id`),
|
||||
ADD KEY `date` (`date`);
|
||||
|
||||
--
|
||||
-- Indexes for table `participants`
|
||||
--
|
||||
ALTER TABLE `backup_participants`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `expense_id` (`expense_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `permissions`
|
||||
--
|
||||
ALTER TABLE `backup_permissions`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `expenses`
|
||||
--
|
||||
ALTER TABLE `backup_expenses`
|
||||
MODIFY `id` bigint(25) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=897648;
|
||||
--
|
||||
-- AUTO_INCREMENT for table `expense_emails`
|
||||
--
|
||||
ALTER TABLE `backup_expense_emails`
|
||||
MODIFY `id` bigint(25) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9455;
|
||||
--
|
||||
-- AUTO_INCREMENT for table `group_settings`
|
||||
--
|
||||
ALTER TABLE `backup_group_settings`
|
||||
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=856;
|
||||
--
|
||||
-- AUTO_INCREMENT for table `logs`
|
||||
--
|
||||
ALTER TABLE `backup_logs`
|
||||
MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26795;
|
||||
--
|
||||
-- AUTO_INCREMENT for table `meals`
|
||||
--
|
||||
ALTER TABLE `backup_meals`
|
||||
MODIFY `id` bigint(25) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3325;
|
||||
--
|
||||
-- AUTO_INCREMENT for table `participants`
|
||||
--
|
||||
ALTER TABLE `backup_participants`
|
||||
MODIFY `id` int(25) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=44905;
|
||||
--
|
||||
-- AUTO_INCREMENT for table `permissions`
|
||||
--
|
||||
ALTER TABLE `backup_permissions`
|
||||
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1521;
|
||||
|
||||
254
db/subscription_db_script.sql
Normal file
254
db/subscription_db_script.sql
Normal file
@@ -0,0 +1,254 @@
|
||||
|
||||
ALTER TABLE `users`
|
||||
ADD `group_expiry_date` DATETIME NULL AFTER `resetpass_token_expire_date`,
|
||||
ADD `mess_expiry_date` DATETIME NULL AFTER `group_expiry_date`,
|
||||
ADD `family_expiry_date` DATETIME NULL AFTER `mess_expiry_date`;
|
||||
|
||||
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `deposits`;
|
||||
CREATE TABLE `deposits` (
|
||||
`id` int(11) NOT NULL,
|
||||
`user_id` int(11) NOT NULL,
|
||||
`payment_id` varchar(255) CHARACTER SET latin1 DEFAULT NULL COMMENT 'system generated unique id',
|
||||
`fee` int(11) NOT NULL DEFAULT '0',
|
||||
`gross` int(11) NOT NULL DEFAULT '0',
|
||||
`cost` int(11) NOT NULL DEFAULT '0',
|
||||
`net` int(11) NOT NULL DEFAULT '0',
|
||||
`type` int(11) DEFAULT NULL COMMENT '1 = EFT, 2 = Automatic',
|
||||
`status` int(11) DEFAULT NULL COMMENT '0 = Pending, 1= Paid, 2 = Refund, 3 = Payment Fail',
|
||||
`user_ip` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
|
||||
`created_date` datetime NOT NULL,
|
||||
`updated_date` datetime NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
DROP TABLE IF EXISTS `orders`;
|
||||
CREATE TABLE `orders` (
|
||||
`id` int(11) NOT NULL,
|
||||
`payment_id` varchar(255) CHARACTER SET latin1 DEFAULT NULL COMMENT 'system generated unique id like <expense_type>-<user_id>-<time>-<random_number>',
|
||||
`order_unique_id` varchar(255) CHARACTER SET latin1 DEFAULT NULL COMMENT 'Like : <expense_type>-<user_id>-<time>',
|
||||
`user_id` int(11) NOT NULL,
|
||||
`product_id` int(11) NOT NULL,
|
||||
`expire_date` datetime NOT NULL COMMENT 'Expire date of current purchase',
|
||||
`product_price` int(11) NOT NULL DEFAULT '0',
|
||||
`fee` int(11) NOT NULL DEFAULT '0',
|
||||
`gross` int(11) NOT NULL DEFAULT '0',
|
||||
`cost` int(11) NOT NULL DEFAULT '0',
|
||||
`net` int(11) NOT NULL DEFAULT '0',
|
||||
`currency_id` int(11) NOT NULL DEFAULT '1' COMMENT '1 = USD',
|
||||
`platform_id` int(11) NOT NULL,
|
||||
`device_id` varchar(255) CHARACTER SET latin1 DEFAULT NULL COMMENT 'session_id for web, device_id for mobile',
|
||||
`status` tinyint(4) NOT NULL COMMENT '0 = Pending, 1= Paid, 2 = Refund, 3 = Payment Fail',
|
||||
`type` tinyint(4) NOT NULL COMMENT '0 = One Time, 1 = Recurring',
|
||||
`user_ip` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
|
||||
`payment_type_id` int(11) NOT NULL COMMENT '1= Wallet, 2 = Credit Card, 3=Paypal',
|
||||
`created_date` datetime NOT NULL,
|
||||
`updated_date` datetime NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
DROP TABLE IF EXISTS `order_billings`;
|
||||
CREATE TABLE `order_billings` (
|
||||
`id` int(11) NOT NULL,
|
||||
`order_id` int(11) NOT NULL,
|
||||
`first_name` varchar(255) DEFAULT NULL,
|
||||
`last_name` varchar(255) DEFAULT NULL,
|
||||
`address1` varchar(255) DEFAULT NULL,
|
||||
`address2` varchar(255) DEFAULT NULL,
|
||||
`city` varchar(255) DEFAULT NULL,
|
||||
`state` varchar(255) DEFAULT NULL,
|
||||
`zip` varchar(255) DEFAULT NULL,
|
||||
`country` varchar(255) DEFAULT NULL,
|
||||
`phone` varchar(255) DEFAULT NULL,
|
||||
`email` varchar(255) DEFAULT NULL,
|
||||
`created_date` datetime NOT NULL,
|
||||
`updated_date` datetime NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
DROP TABLE IF EXISTS `payment_types`;
|
||||
CREATE TABLE `payment_types` (
|
||||
`id` int(11) NOT NULL,
|
||||
`title` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
|
||||
`created_date` datetime NOT NULL,
|
||||
`updated_date` datetime NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
DROP TABLE IF EXISTS `products`;
|
||||
CREATE TABLE `products` (
|
||||
`id` int(11) NOT NULL,
|
||||
`sku` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
|
||||
`title` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
|
||||
`description` text CHARACTER SET latin1,
|
||||
`price` int(11) NOT NULL DEFAULT '0',
|
||||
`currency_id` int(11) NOT NULL DEFAULT '1' COMMENT '1 = USD',
|
||||
`photo` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
|
||||
`expense_type` tinyint(4) NOT NULL COMMENT '1=Group, 2= Mess, 3 = Family',
|
||||
`type` tinyint(4) NOT NULL COMMENT '0 = One Time, 1 = Recurring',
|
||||
`payment_number` int(11) NOT NULL DEFAULT '0',
|
||||
`payment_interval` int(11) NOT NULL DEFAULT '0',
|
||||
`payment_cycle` enum('D','W','M','Y') CHARACTER SET latin1 NOT NULL COMMENT 'D, W, M, Y',
|
||||
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0 = Inactive, 1= Active',
|
||||
`created_date` datetime NOT NULL,
|
||||
`updated_date` datetime NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
DROP TABLE IF EXISTS `recurrings`;
|
||||
CREATE TABLE `recurrings` (
|
||||
`id` int(11) NOT NULL,
|
||||
`user_id` int(11) NOT NULL,
|
||||
`product_id` int(11) NOT NULL,
|
||||
`expense_type` int(11) NOT NULL COMMENT '1=Group, 2= Mess, 3 = Family',
|
||||
`start_date` datetime NOT NULL,
|
||||
`next_action_date` datetime NOT NULL,
|
||||
`amount` int(11) NOT NULL DEFAULT '0',
|
||||
`total_amount` int(11) NOT NULL DEFAULT '0',
|
||||
`payment_number` int(11) NOT NULL DEFAULT '0' COMMENT 'Total number of installments',
|
||||
`payment_interval` int(11) NOT NULL DEFAULT '0' COMMENT 'after how many payment cycle',
|
||||
`payment_cycle` enum('D','W','M','Y') CHARACTER SET latin1 NOT NULL COMMENT 'D, W, M, Y',
|
||||
`created_date` datetime NOT NULL,
|
||||
`updated_date` datetime NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
DROP TABLE IF EXISTS `transactions`;
|
||||
CREATE TABLE `transactions` (
|
||||
`id` int(11) NOT NULL,
|
||||
`payment_id` varchar(255) CHARACTER SET latin1 NOT NULL COMMENT 'system generated unique id',
|
||||
`user_id` int(11) NOT NULL,
|
||||
`type` int(11) NOT NULL COMMENT '1 = Purchase, 2 = Deposit',
|
||||
`entity_id` int(11) NOT NULL COMMENT 'order_id / deposit_id',
|
||||
`description` text CHARACTER SET latin1 NOT NULL,
|
||||
`product_price` int(11) NOT NULL DEFAULT '0',
|
||||
`fee` int(11) NOT NULL DEFAULT '0',
|
||||
`gross` int(11) NOT NULL DEFAULT '0',
|
||||
`cost` int(11) NOT NULL DEFAULT '0',
|
||||
`net` int(11) NOT NULL DEFAULT '0',
|
||||
`currency_id` int(11) NOT NULL DEFAULT '1' COMMENT '1 = USD',
|
||||
`money_flow` varchar(255) CHARACTER SET latin1 NOT NULL DEFAULT '+' COMMENT '+ / -',
|
||||
`current_balance` int(11) NOT NULL DEFAULT '0',
|
||||
`status` tinyint(4) NOT NULL COMMENT '0 = Pending, 1= Paid, 2 = Refund, 3 = Payment Fail',
|
||||
`created_date` datetime NOT NULL,
|
||||
`updated_date` datetime NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
DROP TABLE IF EXISTS `wallets`;
|
||||
CREATE TABLE `wallets` (
|
||||
`id` int(11) NOT NULL,
|
||||
`user_id` int(11) NOT NULL,
|
||||
`currency_id` int(11) NOT NULL DEFAULT '1' COMMENT '1 = USD',
|
||||
`balance` int(11) NOT NULL DEFAULT '0',
|
||||
`withdrawable_balance` int(11) NOT NULL DEFAULT '0',
|
||||
`non_withdrawable_balance` int(11) NOT NULL DEFAULT '0',
|
||||
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0 = Inactive, 1= Active',
|
||||
`created_date` datetime NOT NULL,
|
||||
`updated_date` datetime NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
|
||||
ALTER TABLE `deposits`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
ALTER TABLE `orders`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
ALTER TABLE `order_billings`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
ALTER TABLE `payment_types`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
ALTER TABLE `products`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
ALTER TABLE `recurrings`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
ALTER TABLE `transactions`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
ALTER TABLE `wallets`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
|
||||
ALTER TABLE `deposits`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
||||
ALTER TABLE `orders`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
||||
ALTER TABLE `order_billings`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
||||
ALTER TABLE `payment_types`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
||||
ALTER TABLE `products`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
||||
ALTER TABLE `recurrings`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
||||
ALTER TABLE `transactions`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
||||
ALTER TABLE `wallets`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;COMMIT;
|
||||
|
||||
|
||||
-- 2020-08-28
|
||||
ALTER TABLE `orders` ADD `purchase_token` VARCHAR(255) NULL AFTER `order_unique_id`;
|
||||
|
||||
-- 2020-08-31
|
||||
ALTER TABLE `user_groups` ADD UNIQUE `user_groups_unique_user_id_unique_url`(`user_id`, `unique_url`);
|
||||
ALTER TABLE `users` ADD UNIQUE `users_unique_profile_id_profile_type`(`profile_id`, `profile_type`);
|
||||
|
||||
-- 2020-09-11
|
||||
ALTER TABLE user_groups CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||
ALTER TABLE expenses CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||
ALTER TABLE `user_groups`
|
||||
CHANGE `unique_url` `unique_url` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;
|
||||
ALTER TABLE `products`
|
||||
CHANGE `price` `price` FLOAT(11) NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `orders`
|
||||
CHANGE `product_price` `product_price` FLOAT(11) NOT NULL DEFAULT '0',
|
||||
CHANGE `fee` `fee` FLOAT(11) NOT NULL DEFAULT '0',
|
||||
CHANGE `gross` `gross` FLOAT(11) NOT NULL DEFAULT '0',
|
||||
CHANGE `cost` `cost` FLOAT(11) NOT NULL DEFAULT '0',
|
||||
CHANGE `net` `net` FLOAT(11) NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `recurrings`
|
||||
CHANGE `amount` `amount` FLOAT(11) NOT NULL DEFAULT '0',
|
||||
CHANGE `total_amount` `total_amount` FLOAT(11) NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `transactions`
|
||||
CHANGE `product_price` `product_price` FLOAT(11) NOT NULL DEFAULT '0',
|
||||
CHANGE `fee` `fee` FLOAT(11) NOT NULL DEFAULT '0',
|
||||
CHANGE `gross` `gross` FLOAT(11) NOT NULL DEFAULT '0',
|
||||
CHANGE `cost` `cost` FLOAT(11) NOT NULL DEFAULT '0',
|
||||
CHANGE `net` `net` FLOAT(11) NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `deposits`
|
||||
CHANGE `fee` `fee` FLOAT(11) NOT NULL DEFAULT '0',
|
||||
CHANGE `gross` `gross` FLOAT(11) NOT NULL DEFAULT '0',
|
||||
CHANGE `cost` `cost` FLOAT(11) NOT NULL DEFAULT '0',
|
||||
CHANGE `net` `net` FLOAT(11) NOT NULL DEFAULT '0';
|
||||
|
||||
|
||||
-- 21-09-2020
|
||||
ALTER TABLE `users`
|
||||
CHANGE `verification_token` `verification_token` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;
|
||||
|
||||
-- 25-09-2020
|
||||
CREATE TABLE `user_subscriptions` (
|
||||
`id` int(11) NOT NULL,
|
||||
`user_id` int(11) NOT NULL DEFAULT '0',
|
||||
`payment_method` enum('paypal') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'paypal',
|
||||
`validity` int(5) NOT NULL COMMENT 'in month(s)',
|
||||
`valid_from` datetime NOT NULL,
|
||||
`valid_to` datetime NOT NULL,
|
||||
`item_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`txn_id` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`payment_gross` float(10,2) NOT NULL,
|
||||
`currency_code` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`subscr_id` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`payer_email` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`payment_status` varchar(50) COLLATE utf8_unicode_ci NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
ALTER TABLE `user_subscriptions`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
ALTER TABLE `user_subscriptions`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
||||
|
||||
ALTER TABLE `users`
|
||||
ADD `user_subscription_id` INT NULL AFTER `family_expiry_date`;
|
||||
Reference in New Issue
Block a user