31 if ($this->hasTable(
"entities")) {
35 $table = $this->table(
"entities", [
37 'primary_key' => [
"guid"],
39 'encoding' =>
"utf8mb4",
40 'collation' =>
"utf8mb4_general_ci",
43 $table->addColumn(
'guid',
'integer', [
45 'limit' => MysqlAdapter::INT_BIG,
51 $table->addColumn(
'type',
'enum', [
62 $table->addColumn(
'subtype',
'integer', [
64 'limit' => MysqlAdapter::INT_REGULAR,
69 $table->addColumn(
'owner_guid',
'integer', [
71 'limit' => MysqlAdapter::INT_BIG,
76 $table->addColumn(
'container_guid',
'integer', [
78 'limit' => MysqlAdapter::INT_BIG,
83 $table->addColumn(
'access_id',
'integer', [
85 'limit' => MysqlAdapter::INT_REGULAR,
89 $table->addColumn(
'time_created',
'integer', [
91 'limit' => MysqlAdapter::INT_REGULAR,
95 $table->addColumn(
'time_updated',
'integer', [
97 'limit' => MysqlAdapter::INT_REGULAR,
101 $table->addColumn(
'last_action',
'integer', [
104 'limit' => MysqlAdapter::INT_REGULAR,
108 $table->addColumn(
'enabled',
'enum', [
118 $table->addIndex([
'type'], [
123 $table->addIndex([
'subtype'], [
128 $table->addIndex([
'owner_guid'], [
129 'name' =>
"owner_guid",
133 $table->addIndex([
'container_guid'], [
134 'name' =>
"container_guid",
138 $table->addIndex([
'access_id'], [
139 'name' =>
"access_id",
143 $table->addIndex([
'time_created'], [
144 'name' =>
"time_created",
148 $table->addIndex([
'time_updated'], [
149 'name' =>
"time_updated",
change()
CREATE TABLE prefix_entities ( guid bigint(20) unsigned NOT NULL AUTO_INCREMENT, type enum('object'...