Can not make SQL request of django field in Postgresql database

I have a django model named Interface and created in Postgresql DB? Some char fiels are stored as extended and i can SQL SELECT requests can not find those columns (error bellow). Please someone knows how to solve this ? BR,

Error

SELECT deviceIp  FROM home_interface limit 2;
ERROR:  column "deviceip" does not exist
LINE 1: SELECT deviceIp  FROM home_interface limit 2;
               ^
HINT:  Perhaps you meant to reference the column "home_interface.deviceIp".

Models

class Interface(models.Model):
    deviceIp = models.CharField(max_length=100)
    ifAlias =  models.CharField(max_length=100)
    ifDescription = models.CharField(max_length=100)
    deviceName = models.CharField(max_length=100, default='')
    ifIndex = models.IntegerField(default=0.0)
    name = models.CharField(max_length=100)
    class Meta:
        ordering = ['deviceIp']
        unique_together = ('deviceIp', 'ifIndex')

\d+ home_interface

    Column     |          Type          | Collation | Nullable |                  Default                   | Storage  | Compr
ession | Stats target | Description
---------------+------------------------+-----------+----------+--------------------------------------------+----------+------
-------+--------------+-------------
 id            | integer                |           | not null | nextval('home_interface_id_seq'::regclass) | plain    |
       |              |
 deviceIp      | character varying(100) |           | not null |                                            | extended |
       |              |
 ifAlias       | character varying(100) |           | not null |                                            | extended |
       |              |
 ifDescription | character varying(100) |           | not null |                                            | extended |
       |              |
 deviceName    | character varying(100) |           | not null |                                            | extended |
       |              |
 ifIndex       | integer                |           | not null |                                            | plain    |
       |              |
 name          | character varying(100) |           | not null |                                            | extended |
       |              |
 in_bw         | double precision       |           | not null |                                            | plain    |
       |              |
 out_bw        | double precision       |           | not null |                                            | plain    |
       |              |
 is_monitored  | boolean                |           | not null |                                            | plain    |
       |              |
Indexes:
    "home_interface_pkey" PRIMARY KEY, btree (id)
    "home_interface_deviceIp_ifIndex_22fa8640_uniq" UNIQUE CONSTRAINT, btree ("deviceIp", "ifIndex")
Referenced by:
    TABLE "home_router_interfaces" CONSTRAINT "home_router_interfac_interface_id_55713e19_fk_home_inte" FOREIGN KEY (interface
_id) REFERENCES home_interface(id) DEFERRABLE INITIALLY DEFERRED
Access method: heap

Back to Top