mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-22 13:29:21 +00:00
Update database structure
This commit is contained in:
parent
effd170ee9
commit
510f46910f
@ -39,56 +39,24 @@ CREATE TABLE `commentaires` (
|
|||||||
PRIMARY KEY (`ID`)
|
PRIMARY KEY (`ID`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `comunic_api_limit_count`;
|
DROP TABLE IF EXISTS `comunic_client`;
|
||||||
CREATE TABLE `comunic_api_limit_count` (
|
CREATE TABLE `comunic_client` (
|
||||||
`ip` varchar(15) NOT NULL,
|
`ID` INT NOT NULL AUTO_INCREMENT,
|
||||||
`time_start` int(11) DEFAULT NULL,
|
`name` VARCHAR(45) NOT NULL,
|
||||||
`action` varchar(45) DEFAULT NULL,
|
`domain` VARCHAR(45) NULL COMMENT 'Use to check Referer & define Access-Control-Allow-Origin',
|
||||||
`count` int(11) DEFAULT NULL
|
`comment` VARCHAR(45) NULL COMMENT 'Information about the client',
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
`default_expiration_time` INT GENERATED ALWAYS AS (2592000) COMMENT '2592000 = 1 month',
|
||||||
|
PRIMARY KEY (`ID`));
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `comunic_api_services_tokens`;
|
DROP TABLE IF EXISTS `comunic_user_access_token`;
|
||||||
CREATE TABLE `comunic_api_services_tokens` (
|
CREATE TABLE `comunic_user_access_token` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`time_insert` int(11) DEFAULT NULL,
|
|
||||||
`service_name` varchar(255) NOT NULL,
|
|
||||||
`token` varchar(255) NOT NULL,
|
|
||||||
`client_domain` varchar(45) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `comunic_api_users_tokens`;
|
|
||||||
CREATE TABLE `comunic_api_users_tokens` (
|
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`user_id` int(11) NOT NULL,
|
|
||||||
`service_id` int(11) NOT NULL,
|
|
||||||
`token1` varchar(255) NOT NULL,
|
|
||||||
`token2` varchar(255) NOT NULL,
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `comunic_calls`;
|
|
||||||
CREATE TABLE `comunic_calls` (
|
|
||||||
`id` INT NOT NULL AUTO_INCREMENT,
|
`id` INT NOT NULL AUTO_INCREMENT,
|
||||||
`conversation_id` INT NULL,
|
`client_id` INT NOT NULL,
|
||||||
`last_active` INT NULL,
|
`token` VARCHAR(255) NOT NULL,
|
||||||
PRIMARY KEY (`id`)
|
`last_refresh` INT NOT NULL,
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
`timeout` INT NOT NULL,
|
||||||
|
PRIMARY KEY (`id`));
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `comunic_calls_members`;
|
|
||||||
CREATE TABLE `comunic_calls_members` (
|
|
||||||
`id` INT NOT NULL AUTO_INCREMENT,
|
|
||||||
`call_id` INT NOT NULL,
|
|
||||||
`user_id` INT NULL,
|
|
||||||
`user_call_id` VARCHAR(200) NULL,
|
|
||||||
`status` TINYINT DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `comunic_conversations_list`;
|
DROP TABLE IF EXISTS `comunic_conversations_list`;
|
||||||
CREATE TABLE `comunic_conversations_list` (
|
CREATE TABLE `comunic_conversations_list` (
|
||||||
|
@ -1,2 +1,6 @@
|
|||||||
-- Remove deprecated columns
|
-- Remove deprecated tables
|
||||||
ALTER TABLE texte DROP COLUMN idvideo;
|
DROP TABLE IF EXISTS `comunic_api_limit_count`;
|
||||||
|
DROP TABLE IF EXISTS `comunic_api_users_tokens`;
|
||||||
|
DROP TABLE IF EXISTS `comunic_api_services_tokens`;
|
||||||
|
DROP TABLE IF EXISTS `comunic_calls_members`;
|
||||||
|
DROP TABLE IF EXISTS `comunic_calls`;
|
Loading…
Reference in New Issue
Block a user