| 1 |
<?php |
| 2 |
|
| 3 |
namespace FluentCart\Database\Migrations; |
| 4 |
|
| 5 |
use FluentCart\Framework\Database\Schema; |
| 6 |
|
| 7 |
class AttributeObjectRelationsMigrator extends Migrator |
| 8 |
{ |
| 9 |
|
| 10 |
public static string $tableName = 'fct_atts_relations'; |
| 11 |
|
| 12 |
public static function getSqlSchema(): string |
| 13 |
{ |
| 14 |
$indexPrefix = static::getDbPrefix() . 'fct_at_rel_'; |
| 15 |
return "`id` BIGINT(20) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 16 |
`group_id` BIGINT(20) UNSIGNED NOT NULL, |
| 17 |
`term_id` BIGINT(20) UNSIGNED NOT NULL, |
| 18 |
`object_id` BIGINT(20) UNSIGNED NOT NULL, |
| 19 |
`created_at` DATETIME NULL, |
| 20 |
`updated_at` DATETIME NULL, |
| 21 |
|
| 22 |
INDEX `{$indexPrefix}_group_id_idx` (`group_id` ASC), |
| 23 |
INDEX `{$indexPrefix}_term_id_idx` (`term_id` ASC), |
| 24 |
INDEX `{$indexPrefix}_obj_id_idx` (`object_id` ASC)"; |
| 25 |
} |
| 26 |
} |
| 27 |
|