prefix.DB::$namespace.'_whatsapp_flows'; } public function __construct() { parent::__construct(); $this->table_name = $this->prefix.'_whatsapp_flows'; $this->primary_key = 'id'; $this->version = '1.0'; } public function sql_create() { return "CREATE TABLE {$this->table_name} ( id bigint(20) NOT NULL AUTO_INCREMENT, uuid varchar(255) DEFAULT NULL, restaurant_id bigint(20) DEFAULT NULL, name varchar(255) NOT NULL, type varchar(50) DEFAULT 'whatsapp', description text DEFAULT NULL, structure longtext DEFAULT NULL, configs longtext DEFAULT NULL, active tinyint(1) DEFAULT 0, ordering int(11) DEFAULT 1, date_created datetime NOT NULL, date_modified datetime NOT NULL, PRIMARY KEY (id), UNIQUE KEY `whatsapp_flows_uuid_unique` (`uuid`), KEY `whatsapp_flows_restaurant_id_foreign` (`restaurant_id`), KEY `whatsapp_flows_restaurant_active_index` (`restaurant_id`, `active`), KEY `whatsapp_flows_type_index` (`type`), KEY `whatsapp_flows_ordering_index` (`ordering`), CONSTRAINT `whatsapp_flows_restaurant_id_foreign` FOREIGN KEY (`restaurant_id`) REFERENCES `{$this->prefix}_restaurants` (`id`) ON DELETE CASCADE )"; } public function sql_update_columns_releases() { $queries = []; $this->run_queries_updates($queries); } } SRR_DB_WhatsappFlows::init();