/*
  Warnings:

  - You are about to drop the column `opensip_attrs` on the `rule_groups` table. All the data in the column will be lost.
  - You are about to drop the column `opensip_description` on the `rule_groups` table. All the data in the column will be lost.
  - You are about to drop the column `opensip_groupid` on the `rule_groups` table. All the data in the column will be lost.
  - You are about to drop the column `opensip_gwlist` on the `rule_groups` table. All the data in the column will be lost.
  - You are about to drop the column `opensip_prefix` on the `rule_groups` table. All the data in the column will be lost.
  - You are about to drop the column `opensip_priority` on the `rule_groups` table. All the data in the column will be lost.
  - You are about to drop the column `opensip_routeid` on the `rule_groups` table. All the data in the column will be lost.
  - You are about to drop the column `opensip_ruleid` on the `rule_groups` table. All the data in the column will be lost.
  - You are about to drop the column `opensip_sort_alg` on the `rule_groups` table. All the data in the column will be lost.
  - You are about to drop the column `opensip_sort_profile` on the `rule_groups` table. All the data in the column will be lost.
  - You are about to drop the column `opensip_timerec` on the `rule_groups` table. All the data in the column will be lost.
  - You are about to drop the column `arquived` on the `rules` table. All the data in the column will be lost.
  - You are about to drop the column `title` on the `rules` table. All the data in the column will be lost.
  - Added the required column `gwlist` to the `rule_groups` table without a default value. This is not possible if the table is not empty.
  - Added the required column `title` to the `rule_groups` table without a default value. This is not possible if the table is not empty.
  - Made the column `reference` on table `rule_groups` required. This step will fail if there are existing NULL values in that column.
  - Added the required column `opensip_groupid` to the `rules` table without a default value. This is not possible if the table is not empty.
  - Added the required column `opensip_prefix` to the `rules` table without a default value. This is not possible if the table is not empty.

*/
-- AlterTable
ALTER TABLE `rule_groups` DROP COLUMN `opensip_attrs`,
    DROP COLUMN `opensip_description`,
    DROP COLUMN `opensip_groupid`,
    DROP COLUMN `opensip_gwlist`,
    DROP COLUMN `opensip_prefix`,
    DROP COLUMN `opensip_priority`,
    DROP COLUMN `opensip_routeid`,
    DROP COLUMN `opensip_ruleid`,
    DROP COLUMN `opensip_sort_alg`,
    DROP COLUMN `opensip_sort_profile`,
    DROP COLUMN `opensip_timerec`,
    ADD COLUMN `gwlist` VARCHAR(191) NOT NULL,
    ADD COLUMN `title` VARCHAR(191) NOT NULL,
    MODIFY `reference` VARCHAR(191) NOT NULL;

-- AlterTable
ALTER TABLE `rules` DROP COLUMN `arquived`,
    DROP COLUMN `title`,
    ADD COLUMN `opensip_attrs` VARCHAR(191) NULL,
    ADD COLUMN `opensip_description` VARCHAR(191) NULL,
    ADD COLUMN `opensip_groupid` VARCHAR(191) NOT NULL,
    ADD COLUMN `opensip_gwlist` VARCHAR(191) NULL,
    ADD COLUMN `opensip_prefix` VARCHAR(191) NOT NULL,
    ADD COLUMN `opensip_priority` INTEGER NOT NULL DEFAULT 0,
    ADD COLUMN `opensip_routeid` VARCHAR(191) NULL,
    ADD COLUMN `opensip_ruleid` INTEGER NULL,
    ADD COLUMN `opensip_sort_alg` VARCHAR(191) NOT NULL DEFAULT 'N',
    ADD COLUMN `opensip_sort_profile` INTEGER NULL,
    ADD COLUMN `opensip_timerec` VARCHAR(191) NULL;
