mirror of
https://github.com/PokeAPI/pokeapi
synced 2024-11-10 06:04:18 +00:00
Make the type of the sprites
column in pokemon_v2_pokemonsprites jsonb
This is so Hasura automatically transforms the field into an array instead of a JSON encoded in a string. Migration was generated by the `makemigrations` command.
This commit is contained in:
parent
7f3d32de57
commit
218864dfbc
2 changed files with 21 additions and 1 deletions
19
pokemon_v2/migrations/0014_auto_20231119_0303.py
Normal file
19
pokemon_v2/migrations/0014_auto_20231119_0303.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Generated by Django 2.1.15 on 2023-11-19 03:03
|
||||
|
||||
import django.contrib.postgres.fields.jsonb
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('pokemon_v2', '0013_pokemonabilitypast'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='pokemonsprites',
|
||||
name='sprites',
|
||||
field=django.contrib.postgres.fields.jsonb.JSONField(),
|
||||
),
|
||||
]
|
|
@ -1,4 +1,5 @@
|
|||
from django.db import models
|
||||
from django.contrib.postgres.fields import JSONField
|
||||
|
||||
#####################
|
||||
# ABSTRACT MODELS #
|
||||
|
@ -1795,4 +1796,4 @@ class PokemonTypePast(HasPokemon, HasType, HasGeneration):
|
|||
|
||||
|
||||
class PokemonSprites(HasPokemon):
|
||||
sprites = models.CharField(max_length=20000)
|
||||
sprites = JSONField()
|
||||
|
|
Loading…
Reference in a new issue