Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-8689: Format add_ai_actions.sql #2536

Merged
merged 2 commits into from
Nov 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 36 additions & 38 deletions code_samples/ai_actions/config/mysql/add_ai_actions.sql
Original file line number Diff line number Diff line change
@@ -1,45 +1,43 @@
create table ibexa_action_configuration
CREATE TABLE ibexa_action_configuration
(
id int auto_increment primary key,
identifier varchar(64) not null,
type varchar(32) not null,
enabled tinyint(1) not null,
action_type_options json null,
action_handler_options json null,
action_handler_identifier varchar(64) null,
created_at datetime null comment '(DC2Type:datetime_immutable)',
updated_at datetime null comment '(DC2Type:datetime_immutable)',
constraint ibexa_action_configuration_identifier_uc
unique (identifier)
)
collate = utf8mb4_unicode_520_ci;
id INT auto_increment PRIMARY KEY,
identifier VARCHAR(64) NOT NULL,
type VARCHAR(32) NOT NULL,
enabled TINYINT(1) NOT NULL,
action_type_options JSON NULL,
action_handler_options JSON NULL,
action_handler_identifier VARCHAR(64) NULL,
created_at DATETIME NULL COMMENT '(DC2Type:datetime_immutable)',
updated_at DATETIME NULL COMMENT '(DC2Type:datetime_immutable)',
CONSTRAINT ibexa_action_configuration_identifier_uc
UNIQUE (identifier)
) COLLATE = utf8mb4_unicode_520_ci;

create index ibexa_action_configuration_enabled_idx
on ibexa_action_configuration (enabled);
CREATE INDEX ibexa_action_configuration_enabled_idx
ON ibexa_action_configuration (enabled);

create index ibexa_action_configuration_identifier_idx
on ibexa_action_configuration (identifier);
CREATE INDEX ibexa_action_configuration_identifier_idx
ON ibexa_action_configuration (identifier);

create table ibexa_action_configuration_ml
CREATE TABLE ibexa_action_configuration_ml
(
id int auto_increment primary key,
action_configuration_id int not null,
language_id bigint not null,
name varchar(190) not null,
description longtext null,
constraint ibexa_action_configuration_ml_uidx
unique (action_configuration_id, language_id),
constraint ibexa_action_configuration_ml_to_action_configuration_fk
foreign key (action_configuration_id) references ibexa_action_configuration (id)
on update cascade on delete cascade,
constraint ibexa_action_configuration_ml_to_language_fk
foreign key (language_id) references ezcontent_language (id)
on update cascade on delete cascade
)
collate = utf8mb4_unicode_520_ci;
id INT auto_increment PRIMARY KEY,
action_configuration_id INT NOT NULL,
language_id BIGINT NOT NULL,
name VARCHAR(190) NOT NULL,
description LONGTEXT NULL,
CONSTRAINT ibexa_action_configuration_ml_uidx
UNIQUE (action_configuration_id, language_id),
CONSTRAINT ibexa_action_configuration_ml_to_action_configuration_fk
FOREIGN KEY (action_configuration_id) REFERENCES ibexa_action_configuration (id)
ON UPDATE CASCADE ON DELETE CASCADE,
CONSTRAINT ibexa_action_configuration_ml_to_language_fk
FOREIGN KEY (language_id) REFERENCES ezcontent_language (id)
ON UPDATE CASCADE ON DELETE CASCADE
) COLLATE = utf8mb4_unicode_520_ci;

create index ibexa_action_configuration_ml_action_configuration_idx
on ibexa_action_configuration_ml (action_configuration_id);
CREATE INDEX ibexa_action_configuration_ml_action_configuration_idx
ON ibexa_action_configuration_ml (action_configuration_id);

create index ibexa_action_configuration_ml_language_idx
on ibexa_action_configuration_ml (language_id);
CREATE INDEX ibexa_action_configuration_ml_language_idx
ON ibexa_action_configuration_ml (language_id);
Loading