Migrate from fields.JSON on postgresql.JSON

Bug #1522498 reported by Valentin Kaplov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Confirmed
Low
Fuel Sustaining
Mitaka
Won't Fix
Low
Fuel Python (Deprecated)
Newton
Confirmed
Low
Fuel Sustaining

Bug Description

Actual state:
1. Now any JSON data stores in database as text, not as JSON.
2. We use nailgun.db.sqlalchemy.models.fields.JSON wrapper instead of postgresql JSON type from sqlalchemy library

Expected state:
1. Any column in database should to be JSON type if it actually stores JSON data.
2. all nailgun.db.sqlalchemy.models objects should to use sqlalchemy.dialects.postgresql.JSON instead of wrapper
nailgun.db.sqlalchemy.models.fields.JSON

Action items:
In nailgun/db/sqlalchemy/models/fields.py define JSON type as sqlalchemy.dialects.postgresql.JSON. It would change JSON type everywhere where was used fields.JSON.

Setup JSON type for all database columns, that stores data in JSON format.
Example:
https://review.openstack.org/#/c/246390/16/nailgun/nailgun/db/migration/alembic_migrations/versions/fuel_8_0.py

Related bug: https://bugs.launchpad.net/fuel/+bug/1482399

description: updated
Dmitry Klenov (dklenov)
tags: added: area-python
Changed in fuel:
milestone: none → 8.0
assignee: nobody → Fuel Python Team (fuel-python)
importance: Undecided → Medium
importance: Medium → Low
status: New → Confirmed
Dmitry Pyzhov (dpyzhov)
tags: added: tech-debt
Changed in fuel:
milestone: 8.0 → 9.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.