1
0
mirror of synced 2024-11-22 20:36:01 +03:00
mg-transport-telegram/migrations/1527515265_app.down.sql

26 lines
659 B
MySQL
Raw Normal View History

2018-05-29 10:08:38 +03:00
alter table connection
drop constraint connection_client_id_key,
drop constraint connection_api_key_key,
drop constraint connection_api_url_key,
drop constraint connection_mg_url_key;
alter table connection
alter column client_id drop not null,
alter column api_key drop not null,
alter column api_url drop not null;
alter table bot
alter column connection_id type varchar(70),
alter column token drop not null,
drop constraint bot_token_key;
alter table bot
rename column connection_id to client_id;
create table mapping
(
id serial not null
constraint mapping_pkey
primary key,
site_code text,
bot_id text
);