#222 closed defect (fixed)
r335 - sqlite database wrapper produces numeric (none,none) for a float field
| Reported by: | Owned by: | Adrian Holovaty | |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
this model produces the sql code below. so should produce something like numeric(10,2)
class Product(meta.Model):
db_table = 'products'
fields = (
meta.CharField('name',maxlength=100),
meta.TextField('description'),
meta.ImageField('image_url'),
meta.FloatField('price'),
meta.DateTimeField('date_available','available'),
)
BEGIN;
CREATE TABLE products (
id integer NOT NULL PRIMARY KEY,
name varchar(100) NOT NULL,
description text NOT NULL,
image_url varchar(100) NOT NULL,
price numeric(None, None) NOT NULL,
date_available datetime NOT NULL
);
COMMIT;
Note:
See TracTickets
for help on using tickets.
sorry there is no problem, and i have closed the issue.
being a doofus, i did not initialise the floatfield in the model properly.