22 lines
993 B
SQL
22 lines
993 B
SQL
|
|
/*
|
||
|
|
Warnings:
|
||
|
|
|
||
|
|
- You are about to drop the column `tax_id` on the `business_activities` table. All the data in the column will be lost.
|
||
|
|
- You are about to drop the column `pricingModel` on the `sales_invoice_items` table. All the data in the column will be lost.
|
||
|
|
- Added the required column `owner_id` to the `business_activities` table without a default value. This is not possible if the table is not empty.
|
||
|
|
|
||
|
|
*/
|
||
|
|
-- AlterTable
|
||
|
|
ALTER TABLE `business_activities` DROP COLUMN `tax_id`,
|
||
|
|
ADD COLUMN `owner_id` VARCHAR(191) NOT NULL;
|
||
|
|
|
||
|
|
-- AlterTable
|
||
|
|
ALTER TABLE `complexes` ADD COLUMN `tax_id` VARCHAR(191) NULL;
|
||
|
|
|
||
|
|
-- AlterTable
|
||
|
|
ALTER TABLE `sales_invoice_items` DROP COLUMN `pricingModel`,
|
||
|
|
MODIFY `unit_type` ENUM('COUNT', 'GRAM', 'KILOGRAM', 'MILLILITER', 'LITER', 'METER', 'HOUR') NOT NULL;
|
||
|
|
|
||
|
|
-- AddForeignKey
|
||
|
|
ALTER TABLE `business_activities` ADD CONSTRAINT `business_activities_owner_id_fkey` FOREIGN KEY (`owner_id`) REFERENCES `users`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|