| 1 |
<?php |
| 2 |
|
| 3 |
namespace FluentCart\Database\Migrations; |
| 4 |
|
| 5 |
use FluentCart\Framework\Database\Schema; |
| 6 |
|
| 7 |
class OrderOperationsMigrator extends Migrator |
| 8 |
{ |
| 9 |
|
| 10 |
public static string $tableName = 'fct_order_operations'; |
| 11 |
|
| 12 |
public static function getSqlSchema(): string |
| 13 |
{ |
| 14 |
$indexPrefix = static::getDbPrefix() . 'fct_oo_'; |
| 15 |
return "`id` BIGINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 16 |
`order_id` BIGINT(20) UNSIGNED NOT NULL, |
| 17 |
`created_via` VARCHAR(45) NULL, |
| 18 |
`emails_sent` tinyint(1) NULL DEFAULT 0, |
| 19 |
`sales_recorded` tinyint(1) NULL DEFAULT 0, |
| 20 |
`utm_campaign` VARCHAR(192) NULL DEFAULT '', |
| 21 |
`utm_term` VARCHAR(192) NULL DEFAULT '', |
| 22 |
`utm_source` VARCHAR(192) NULL DEFAULT '', |
| 23 |
`utm_medium` VARCHAR(192) NULL DEFAULT '', |
| 24 |
`utm_content` VARCHAR(192) NULL DEFAULT '', |
| 25 |
`utm_id` VARCHAR(192) NULL DEFAULT '', |
| 26 |
`cart_hash` VARCHAR(192) NULL DEFAULT '', |
| 27 |
`refer_url` VARCHAR(192) NULL DEFAULT '', |
| 28 |
`meta` json DEFAULT NULL, |
| 29 |
`created_at` DATETIME NULL, |
| 30 |
`updated_at` DATETIME NULL, |
| 31 |
INDEX `{$indexPrefix}_order_operations_idx` (`order_id` ASC)"; |
| 32 |
|
| 33 |
} |
| 34 |
} |
| 35 |
|