Anyblok-attachment

Latest version: v2.1.1

Safety actively analyzes 682361 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

2.1.0

------------------

* Removed **Python 3.4** capability
* Removed **Python 3.5** capability
* Refactored unittest, replaced nose by pytest
* Added **attachment_postgres** blok, only for postgresql driver,
the **LargeBinary** column is replaced by **LargeObject** column

2.0.0

------------------

* Removed the sequence created by the document. Replaced it by a simple counter on latest document

.. note::

You can use this script before migration to update the database::

CREATE FUNCTION update_attachment() RETURNS void AS $$
DECLARE
-- declarations
target RECORD;
BEGIN
FOR target IN select uuid, version from attachment_document where version_number is null LOOP
UPDATE attachment_document SET version_number = CAST(substring(target.version from '..$') as Integer) WHERE uuid = target.uuid AND version = target.version;
END LOOP;
END;
$$ LANGUAGE plpgsql;

CREATE FUNCTION update_sequence() RETURNS void AS $$
DECLARE
-- declarations
seq RECORD;
BEGIN
FOR seq IN select id, seq_name from system_sequence where code ilike 'Attachment.Document%' LOOP
EXECUTE 'DROP SEQUENCE ' || quote_ident(seq.seq_name);
DELETE FROM system_sequence where id = seq.id;
END LOOP;
END;
$$ LANGUAGE plpgsql;

ALTER TABLE attachment_document DROP CONSTRAINT anyblok_pk_attachment_document;
ALTER TABLE attachment_document ADD COLUMN version_number INTEGER;
select update_attachment();
select update_sequence();
ALTER TABLE attachment_document ADD PRIMARY KEY (uuid, version_number);
UPDATE system_blok SET installed_version = '2.0.0' WHERE name = 'attachment';
DROP FUNCTION update_attachment();
DROP FUNCTION update_sequence();

1.2.0

------------------

* Allow to get another field to represent the file
* PR 4: Added a column name on the template to identify them easyly (GohuHQ)
* PR 3: Fixed option name for wkhtmltopdf (GohuHQ)

1.1.1

------------------

* Fix the mixins come from **anyblok_mixins**

1.1.0

------------------

* [ADD] add Mixin ``Mixin.LatestDocument`` and ``Mixin.VersionedDocument``
to help the developer to get **latest_document** or **versioned_document**

1.0.2

------------------

* [REF] Anyblok 0.17.0 changed setter to add application and application
groups, So I had to adapt the existing to use new setter

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.