Skip to content

Commit

Permalink
Merge pull request #41 from bahattincinic/double
Browse files Browse the repository at this point in the history
Double data type added
  • Loading branch information
bahattincinic committed Sep 14, 2017
2 parents 0535d5c + 1531e7e commit aeda897
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion web/dbpatterns/documents/constants.py
Expand Up @@ -9,6 +9,7 @@
TYPES_TIME = "time"
TYPES_CURRENCY = "currency"
TYPES_TEXT = "text"
TYPES_DOUBLE = "double"

FIELD_TYPES = (
(TYPES_INTEGER, "integer"),
Expand All @@ -19,6 +20,7 @@
(TYPES_DATE, "date"),
(TYPES_TIME, "time"),
(TYPES_CURRENCY, "currency"),
(TYPES_DOUBLE, "double")
)

EXPORTER_MYSQL = "mysql"
Expand All @@ -34,4 +36,4 @@
)

CAN_EDIT = "can_edit"
CAN_VIEW = "can_view"
CAN_VIEW = "can_view"
1 change: 1 addition & 0 deletions web/dbpatterns/documents/exporters/sql.py
Expand Up @@ -13,6 +13,7 @@ class SQLExporter(BaseExporter):
TYPES_TIME: "time",
TYPES_DATETIME: "datetime",
TYPES_DATE: "date",
TYPES_DOUBLE: "double precision"
}
DEFAULT_TYPE = "varchar"
COMMA_LITERAL = ","
Expand Down
3 changes: 2 additions & 1 deletion web/dbpatterns/documents/parsers/django_orm.py
Expand Up @@ -21,7 +21,8 @@
"FileField": TYPES_STRING,
"ForeignKey": FOREIGN_KEY_FIELD,
"ManyToManyField": MANY_TO_MANY_FIELD,
"OneToOneField": FOREIGN_KEY_FIELD
"OneToOneField": FOREIGN_KEY_FIELD,
"FloatField": TYPES_DOUBLE
}

DEFAULT_FIELD_TYPE = "string"
Expand Down

0 comments on commit aeda897

Please sign in to comment.