<?php
// Бизнес-процессы
run_query("CREATE TABLE " . $config['table_prefix'] . "bizproc (
    id int(11) NOT NULL AUTO_INCREMENT,
    name varchar(255) NOT NULL,
    autostart tinyint(1) NOT NULL,
    PRIMARY KEY (id)
    ) ENGINE=" . $config['db_engine'] . " DEFAULT CHARSET=utf8");
run_query("CREATE TABLE " . $config['table_prefix'] . "bizproc_running (
    user_id int(11) NOT NULL,
    proc_id int(11) NOT NULL,
    step int(11) NOT NULL
    ) ENGINE=" . $config['db_engine'] . " DEFAULT CHARSET=utf8");
run_query("CREATE TABLE " . $config['table_prefix'] . "bizproc_steps (
    id int(11) NOT NULL AUTO_INCREMENT,
    proc_id int(11) NOT NULL,
    num int(11) NOT NULL,
    name varchar(255) NOT NULL,
    description text NOT NULL,
    link varchar(255) NOT NULL,
    video varchar(255) NOT NULL,
    att_file longblob NOT NULL,
    att_file_name varchar(255) NOT NULL,
    att_file_type varchar(255) NOT NULL,
    PRIMARY KEY (id)
    ) ENGINE=" . $config['db_engine'] . " DEFAULT CHARSET=utf8");
?>