diff --git a/categories/migration/add_description.sql b/categories/migration/add_description.sql new file mode 100644 index 0000000..4b8e864 --- /dev/null +++ b/categories/migration/add_description.sql @@ -0,0 +1,3 @@ +BEGIN; +ALTER TABLE "categories_category" ADD COLUMN "description" varchar(255); +COMMIT; \ No newline at end of file diff --git a/categories/migration/drop_description.sql b/categories/migration/drop_description.sql new file mode 100644 index 0000000..24de722 --- /dev/null +++ b/categories/migration/drop_description.sql @@ -0,0 +1,3 @@ +BEGIN; +ALTER TABLE "categories_category" DROP COLUMN "description"; +COMMIT; \ No newline at end of file diff --git a/categories/models.py b/categories/models.py index 2f89377..e234d70 100644 --- a/categories/models.py +++ b/categories/models.py @@ -12,6 +12,7 @@ class Category(models.Model): help_text="Leave this blank for an Category Tree", verbose_name='Parent') name = models.CharField(max_length=100) + description = models.CharField(blank=True, null=True, max_length=255) order = models.IntegerField(blank=True, null=True) slug = models.SlugField()