JoeTrubenstein / peep-show-api

an unofficial fan-made API for getting data from the Channel 4 series Peep Show

Home Page:https://peep-show-api.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add array field to Character model

JoeTrubenstein opened this issue · comments

Currently the value for a character's quotes is a string.

It would be much better if quotes could be stored as an array, as they could then be iterated through individually.

I believe the current install of Heroku PostgreSQL will support this.

If not, we can explore other options.

Database behaved as expected after adding Postgres array field with

from django.contrib.postgres.fields import ArrayField

...

and replacing the original quotes field with the following in the Character model

quotes = ArrayField(models.CharField(max_length=1200), blank=True)