Initial commit MKD fixes
This commit is contained in:
17
backend/migrations/add_closing_docs_files_to_payment_invoices.sql
Executable file
17
backend/migrations/add_closing_docs_files_to_payment_invoices.sql
Executable file
@@ -0,0 +1,17 @@
|
||||
-- Миграция для добавления массива файлов закрывающих документов в payment_invoices
|
||||
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM information_schema.columns
|
||||
WHERE table_name = 'payment_invoices'
|
||||
AND column_name = 'closing_docs_files'
|
||||
) THEN
|
||||
ALTER TABLE payment_invoices
|
||||
ADD COLUMN closing_docs_files JSONB DEFAULT '[]';
|
||||
|
||||
COMMENT ON COLUMN payment_invoices.closing_docs_files IS 'Список файлов закрывающих документов: [{filename, url, size, mimetype, uploadedAt, storedFilename}]';
|
||||
END IF;
|
||||
END $$;
|
||||
|
||||
Reference in New Issue
Block a user