Running migrations on MySQL (Server version: 8.0.31 MySQL Community Server - GPL) raises following error
django.db.utils.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'cidr NOT NULL, `description` varchar(100) NOT NULL, `master_subnet_id` char(32) ' at line 1")
The CIDR data type is also not supported on MariaDB.
|
class NetworkField(models.Field): |
|
empty_strings_allowed = False |
|
description = 'CIDR type network field' |
|
|
|
def __init__(self, *args, **kwargs): |
|
kwargs['max_length'] = 43 |
|
super().__init__(*args, **kwargs) |
|
|
|
def db_type(self, connection): |
|
return 'cidr' |
Running migrations on MySQL (Server version: 8.0.31 MySQL Community Server - GPL) raises following error
The
CIDRdata type is also not supported on MariaDB.openwisp-ipam/openwisp_ipam/base/fields.py
Lines 34 to 43 in 956d9d2