mirror of
https://github.com/PokeAPI/pokeapi
synced 2024-11-25 04:40:21 +00:00
parent
5e9296f948
commit
5ad1cb0ea5
8 changed files with 117 additions and 8966 deletions
13
README.md
13
README.md
|
@ -42,19 +42,6 @@ If you ever need to wipe the database use this command:
|
|||
$ make wipe_db
|
||||
```
|
||||
|
||||
## V2 Database setup
|
||||
|
||||
To build out the data you'll need to jump into the Django shell
|
||||
|
||||
```
|
||||
$ python manage.py shell
|
||||
```
|
||||
and run the build script with
|
||||
```
|
||||
$ execfile('data/v2/build.py')
|
||||
```
|
||||
Each time the build script is run it will iterate over each table in the database, wipe it and rewrite each row using the data found in data/v2/csv.
|
||||
If you don't need all of the data just go into data/v2/build.py and comment out everything but what you need to build the tables you're looking for. This might be useful because some of the csv files are massive (pokemon_moves expecially) and it can take about 25 minutes to build everything.
|
||||
|
||||
## Contributing
|
||||
|
||||
|
|
745
data/v2/build.py
745
data/v2/build.py
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -3,107 +3,19 @@ from django.contrib import admin
|
|||
|
||||
from .models import *
|
||||
|
||||
admin.site.register(Ability)
|
||||
admin.site.register(AbilityName)
|
||||
admin.site.register(AbilityDescription)
|
||||
admin.site.register(AbilityFlavorText)
|
||||
admin.site.register(AbilityChange)
|
||||
admin.site.register(AbilityChangeDescription)
|
||||
|
||||
admin.site.register(Characteristic)
|
||||
admin.site.register(CharacteristicDescription)
|
||||
|
||||
admin.site.register(EggGroup)
|
||||
admin.site.register(EggGroupName)
|
||||
|
||||
admin.site.register(EvolutionChain)
|
||||
admin.site.register(EvolutionTrigger)
|
||||
admin.site.register(EvolutionTriggerName)
|
||||
|
||||
admin.site.register(Experience)
|
||||
|
||||
admin.site.register(Gender)
|
||||
|
||||
admin.site.register(Generation)
|
||||
admin.site.register(GenerationName)
|
||||
|
||||
admin.site.register(GrowthRate)
|
||||
admin.site.register(GrowthRateDescription)
|
||||
|
||||
admin.site.register(Language)
|
||||
admin.site.register(LanguageName)
|
||||
|
||||
admin.site.register(Machine)
|
||||
|
||||
admin.site.register(MoveBattleStyle)
|
||||
admin.site.register(MoveBattleStyleName)
|
||||
admin.site.register(MoveChange)
|
||||
admin.site.register(MoveDamageClass)
|
||||
admin.site.register(MoveDamageClassDescription)
|
||||
admin.site.register(MoveEffectChange)
|
||||
admin.site.register(MoveEffectChangeDescription)
|
||||
admin.site.register(MoveEffectDescription)
|
||||
admin.site.register(MoveEffect)
|
||||
admin.site.register(MoveFlagMap)
|
||||
admin.site.register(MoveFlagDescription)
|
||||
admin.site.register(MoveFlag)
|
||||
admin.site.register(MoveFlavorText)
|
||||
admin.site.register(MoveMeta)
|
||||
admin.site.register(MoveMetaAilment)
|
||||
admin.site.register(MoveMetaAilmentName)
|
||||
admin.site.register(MoveMetaCategoryDescription)
|
||||
admin.site.register(MoveMetaCategory)
|
||||
admin.site.register(MoveMetaStatChange)
|
||||
admin.site.register(MoveName)
|
||||
admin.site.register(MoveTargetDescription)
|
||||
admin.site.register(MoveTarget)
|
||||
admin.site.register(Move)
|
||||
|
||||
admin.site.register(NatureBattleStylePreference)
|
||||
admin.site.register(NatureName)
|
||||
admin.site.register(NaturePokeathlonStat)
|
||||
admin.site.register(Nature)
|
||||
|
||||
admin.site.register(Pokedex)
|
||||
admin.site.register(PokedexVersionGroup)
|
||||
admin.site.register(PokedexDescription)
|
||||
|
||||
admin.site.register(Pokemon)
|
||||
admin.site.register(PokemonAbility)
|
||||
admin.site.register(PokemonColor)
|
||||
admin.site.register(PokemonColorName)
|
||||
admin.site.register(PokemonDexNumber)
|
||||
admin.site.register(PokemonEggGroup)
|
||||
admin.site.register(PokemonEvolution)
|
||||
admin.site.register(PokemonForm)
|
||||
admin.site.register(PokemonFormName)
|
||||
admin.site.register(PokemonFormGeneration)
|
||||
admin.site.register(PokemonGameIndex)
|
||||
admin.site.register(PokemonHabitat)
|
||||
admin.site.register(PokemonHabitatName)
|
||||
admin.site.register(PokemonItem)
|
||||
admin.site.register(PokemonMove)
|
||||
admin.site.register(PokemonMoveMethod)
|
||||
admin.site.register(PokemonMoveMethodName)
|
||||
admin.site.register(PokemonShape)
|
||||
admin.site.register(PokemonShapeName)
|
||||
admin.site.register(PokemonSpecies)
|
||||
admin.site.register(PokemonSpeciesName)
|
||||
admin.site.register(PokemonSpeciesDescription)
|
||||
admin.site.register(PokemonSpeciesFlavorText)
|
||||
admin.site.register(PokemonStat)
|
||||
admin.site.register(PokemonType)
|
||||
|
||||
admin.site.register(StatName)
|
||||
admin.site.register(Stat)
|
||||
|
||||
admin.site.register(Type)
|
||||
admin.site.register(TypeName)
|
||||
admin.site.register(TypeGameIndex)
|
||||
admin.site.register(TypeEfficacy)
|
||||
admin.site.register(Generation)
|
||||
admin.site.register(GenerationName)
|
||||
|
||||
admin.site.register(Version)
|
||||
admin.site.register(VersionName)
|
||||
admin.site.register(VersionGroup)
|
||||
admin.site.register(VersionGroupRegion)
|
||||
admin.site.register(VersionGroupPokemonMoveMethod)
|
||||
|
||||
admin.site.register(Ability)
|
||||
admin.site.register(AbilityName)
|
||||
admin.site.register(AbilityDescription)
|
||||
admin.site.register(AbilityFlavorText)
|
||||
|
|
|
@ -6,8 +6,6 @@ from django.db import models, migrations
|
|||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
replaces = [(b'pokemon_v2', '0001_squashed_0021_auto_20150409_0453'), (b'pokemon_v2', '0002_auto_20150412_1636'), (b'pokemon_v2', '0003_auto_20150412_1705'), (b'pokemon_v2', '0004_auto_20150412_1715'), (b'pokemon_v2', '0005_auto_20150412_1721'), (b'pokemon_v2', '0006_auto_20150412_1808'), (b'pokemon_v2', '0007_auto_20150412_1809'), (b'pokemon_v2', '0008_auto_20150412_1810'), (b'pokemon_v2', '0009_auto_20150412_1814'), (b'pokemon_v2', '0010_auto_20150412_1818'), (b'pokemon_v2', '0011_auto_20150412_1820'), (b'pokemon_v2', '0012_auto_20150412_1821'), (b'pokemon_v2', '0013_auto_20150412_1822'), (b'pokemon_v2', '0014_auto_20150412_1823'), (b'pokemon_v2', '0015_auto_20150412_1825'), (b'pokemon_v2', '0016_auto_20150412_1827'), (b'pokemon_v2', '0017_auto_20150412_1828'), (b'pokemon_v2', '0018_auto_20150412_1833'), (b'pokemon_v2', '0019_auto_20150412_1837'), (b'pokemon_v2', '0020_machine')]
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
|
@ -370,7 +368,7 @@ class Migration(migrations.Migration):
|
|||
name='CharacteristicDescription',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('description', models.CharField(default='', max_length=1000)),
|
||||
('description', models.CharField(default='', max_length=200)),
|
||||
('characteristic', models.ForeignKey(blank=True, to='pokemon_v2.Characteristic', null=True)),
|
||||
('language', models.ForeignKey(blank=True, to='pokemon_v2.Language', null=True)),
|
||||
],
|
||||
|
@ -421,7 +419,7 @@ class Migration(migrations.Migration):
|
|||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('growth_rate', models.ForeignKey(blank=True, to='pokemon_v2.GrowthRate', null=True)),
|
||||
('language', models.ForeignKey(blank=True, to='pokemon_v2.Language', null=True)),
|
||||
('description', models.CharField(default='', max_length=1000)),
|
||||
('description', models.CharField(default='', max_length=200)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
|
@ -502,7 +500,7 @@ class Migration(migrations.Migration):
|
|||
name='MoveDamageClassDescription',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('description', models.CharField(default='', max_length=1000)),
|
||||
('description', models.CharField(default='', max_length=200)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('language', models.ForeignKey(blank=True, to='pokemon_v2.Language', null=True)),
|
||||
('move_damage_class', models.ForeignKey(blank=True, to='pokemon_v2.MoveDamageClass', null=True)),
|
||||
|
@ -575,7 +573,7 @@ class Migration(migrations.Migration):
|
|||
name='MoveFlagDescription',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('description', models.CharField(default='', max_length=1000)),
|
||||
('description', models.CharField(default='', max_length=200)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('language', models.ForeignKey(blank=True, to='pokemon_v2.Language', null=True)),
|
||||
('move_flag', models.ForeignKey(blank=True, to='pokemon_v2.MoveFlag', null=True)),
|
||||
|
@ -601,7 +599,7 @@ class Migration(migrations.Migration):
|
|||
name='MoveFlavorText',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('flavor_text', models.CharField(max_length=500)),
|
||||
('flavor_text', models.CharField(max_length=200)),
|
||||
('language', models.ForeignKey(blank=True, to='pokemon_v2.Language', null=True)),
|
||||
('move', models.ForeignKey(blank=True, to='pokemon_v2.Move', null=True)),
|
||||
('version_group', models.ForeignKey(blank=True, to='pokemon_v2.VersionGroup', null=True)),
|
||||
|
@ -670,7 +668,7 @@ class Migration(migrations.Migration):
|
|||
name='MoveMetaCategoryDescription',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('description', models.CharField(default='', max_length=1000)),
|
||||
('description', models.CharField(default='', max_length=200)),
|
||||
('language', models.ForeignKey(blank=True, to='pokemon_v2.Language', null=True)),
|
||||
('move_meta_category', models.ForeignKey(blank=True, to='pokemon_v2.MoveMetaCategory', null=True)),
|
||||
],
|
||||
|
@ -720,7 +718,7 @@ class Migration(migrations.Migration):
|
|||
name='MoveTargetDescription',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('description', models.CharField(default='', max_length=1000)),
|
||||
('description', models.CharField(default='', max_length=200)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('language', models.ForeignKey(blank=True, to='pokemon_v2.Language', null=True)),
|
||||
('move_target', models.ForeignKey(blank=True, to='pokemon_v2.MoveTarget', null=True)),
|
||||
|
@ -1216,721 +1214,4 @@ class Migration(migrations.Migration):
|
|||
field=models.ForeignKey(blank=True, to='pokemon_v2.MoveDamageClass', null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AbilityChange',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('ability', models.ForeignKey(blank=True, to='pokemon_v2.Ability', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AbilityChangeDescription',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('effect', models.CharField(max_length=1000)),
|
||||
('ability_change', models.ForeignKey(blank=True, to='pokemon_v2.AbilityChange', null=True)),
|
||||
('language', models.ForeignKey(blank=True, to='pokemon_v2.Language', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='EvolutionChain',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('baby_evolution_item', models.IntegerField()),
|
||||
],
|
||||
options={
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='EvolutionTrigger',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='EvolutionTriggerName',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('evolution_trigger', models.ForeignKey(blank=True, to='pokemon_v2.EvolutionTrigger', null=True)),
|
||||
('language', models.ForeignKey(blank=True, to='pokemon_v2.Language', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Experience',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('level', models.IntegerField()),
|
||||
('experience', models.IntegerField()),
|
||||
('growth_rate', models.ForeignKey(blank=True, to='pokemon_v2.GrowthRate', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Gender',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Pokedex',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('region_id', models.IntegerField(null=True, blank=True)),
|
||||
('is_main_series', models.BooleanField(default=False)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokedexDescription',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('description', models.CharField(default='', max_length=1000)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('language', models.ForeignKey(blank=True, to='pokemon_v2.Language', null=True)),
|
||||
('pokedex', models.ForeignKey(blank=True, to='pokemon_v2.Pokedex', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokedexVersionGroup',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('pokedex', models.ForeignKey(blank=True, to='pokemon_v2.Pokedex', null=True)),
|
||||
('version_group', models.ForeignKey(blank=True, to='pokemon_v2.VersionGroup', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Pokemon',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('order', models.IntegerField()),
|
||||
('height', models.IntegerField()),
|
||||
('weight', models.IntegerField()),
|
||||
('base_experience', models.IntegerField()),
|
||||
('is_default', models.BooleanField(default=False)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonAbility',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('is_hidden', models.BooleanField(default=False)),
|
||||
('slot', models.IntegerField()),
|
||||
('ability', models.ForeignKey(blank=True, to='pokemon_v2.Ability', null=True)),
|
||||
('pokemon', models.ForeignKey(blank=True, to='pokemon_v2.Pokemon', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonColor',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonColorName',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('language', models.ForeignKey(blank=True, to='pokemon_v2.Language', null=True)),
|
||||
('pokemon_color', models.ForeignKey(blank=True, to='pokemon_v2.PokemonColor', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonDexNumber',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('pokedex_number', models.IntegerField()),
|
||||
('pokedex', models.ForeignKey(blank=True, to='pokemon_v2.Pokedex', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonEggGroup',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('egg_group', models.ForeignKey(blank=True, to='pokemon_v2.EggGroup', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonEvolution',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('item', models.IntegerField()),
|
||||
('min_level', models.IntegerField()),
|
||||
('location_id', models.IntegerField()),
|
||||
('held_item', models.IntegerField()),
|
||||
('time_of_day', models.CharField(max_length=10)),
|
||||
('min_happiness', models.IntegerField()),
|
||||
('minimum_beauty', models.IntegerField()),
|
||||
('min_affection', models.IntegerField()),
|
||||
('relative_physical_stats', models.IntegerField()),
|
||||
('needs_overworld_rain', models.BooleanField(default=False)),
|
||||
('turn_upside_down', models.BooleanField(default=False)),
|
||||
('evolution_trigger', models.ForeignKey(blank=True, to='pokemon_v2.EvolutionTrigger', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonForm',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('order', models.IntegerField()),
|
||||
('form_identifier', models.CharField(max_length=30)),
|
||||
('is_default', models.BooleanField(default=False)),
|
||||
('is_battle_only', models.BooleanField(default=False)),
|
||||
('is_mega_form_order', models.BooleanField(default=False)),
|
||||
('introduces_in_version_group', models.ForeignKey(blank=True, to='pokemon_v2.VersionGroup', null=True)),
|
||||
('pokemon', models.ForeignKey(blank=True, to='pokemon_v2.Pokemon', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonFormGeneration',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('game_index', models.IntegerField()),
|
||||
('generation', models.ForeignKey(blank=True, to='pokemon_v2.Generation', null=True)),
|
||||
('pokemon_form', models.ForeignKey(blank=True, to='pokemon_v2.PokemonForm', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonFormName',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('pokemon_name', models.CharField(max_length=30)),
|
||||
('language', models.ForeignKey(blank=True, to='pokemon_v2.Language', null=True)),
|
||||
('pokemon_form', models.ForeignKey(blank=True, to='pokemon_v2.PokemonForm', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonGameIndex',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('game_index', models.IntegerField()),
|
||||
('pokemon', models.ForeignKey(blank=True, to='pokemon_v2.Pokemon', null=True)),
|
||||
('version', models.ForeignKey(blank=True, to='pokemon_v2.Version', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonHabitat',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonHabitatName',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('language', models.ForeignKey(blank=True, to='pokemon_v2.Language', null=True)),
|
||||
('pokemon_habitat', models.ForeignKey(blank=True, to='pokemon_v2.PokemonHabitat', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonItem',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('item_id', models.IntegerField()),
|
||||
('rarity', models.IntegerField()),
|
||||
('pokemon', models.ForeignKey(blank=True, to='pokemon_v2.Pokemon', null=True)),
|
||||
('version', models.ForeignKey(blank=True, to='pokemon_v2.Version', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonMove',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('order', models.IntegerField()),
|
||||
('level', models.IntegerField()),
|
||||
('move', models.ForeignKey(blank=True, to='pokemon_v2.Move', null=True)),
|
||||
('pokemon', models.ForeignKey(blank=True, to='pokemon_v2.Pokemon', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonMoveMethod',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonMoveMethodName',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('description', models.CharField(default='', max_length=1000)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('language', models.ForeignKey(blank=True, to='pokemon_v2.Language', null=True)),
|
||||
('pokemon_move_method', models.ForeignKey(blank=True, to='pokemon_v2.PokemonMoveMethod', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonShape',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonShapeName',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('awesome_name', models.CharField(max_length=30)),
|
||||
('language', models.ForeignKey(blank=True, to='pokemon_v2.Language', null=True)),
|
||||
('pokemon_shape', models.ForeignKey(blank=True, to='pokemon_v2.PokemonShape', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonSpecies',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('order', models.IntegerField()),
|
||||
('gender_rate', models.IntegerField()),
|
||||
('capture_rate', models.IntegerField()),
|
||||
('base_happiness', models.IntegerField()),
|
||||
('is_baby', models.BooleanField()),
|
||||
('hatch_counter', models.IntegerField()),
|
||||
('has_gender_differences', models.BooleanField()),
|
||||
('forms_switchable', models.BooleanField()),
|
||||
('evolution_chain', models.ForeignKey(blank=True, to='pokemon_v2.EvolutionChain', null=True)),
|
||||
('evolves_from_species', models.ForeignKey(blank=True, to='pokemon_v2.PokemonSpecies', null=True)),
|
||||
('generation', models.ForeignKey(blank=True, to='pokemon_v2.Generation', null=True)),
|
||||
('growth_rate', models.ForeignKey(blank=True, to='pokemon_v2.GrowthRate', null=True)),
|
||||
('pokemon_color', models.ForeignKey(blank=True, to='pokemon_v2.PokemonColor', null=True)),
|
||||
('pokemon_habitat', models.ForeignKey(blank=True, to='pokemon_v2.PokemonHabitat', null=True)),
|
||||
('pokemon_shape', models.ForeignKey(blank=True, to='pokemon_v2.PokemonShape', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonSpeciesDescription',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('description', models.CharField(default='', max_length=1000)),
|
||||
('language', models.ForeignKey(blank=True, to='pokemon_v2.Language', null=True)),
|
||||
('pokemon_species', models.ForeignKey(blank=True, to='pokemon_v2.PokemonSpecies', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonSpeciesFlavorText',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('flavor_text', models.CharField(max_length=500)),
|
||||
('language', models.ForeignKey(blank=True, to='pokemon_v2.Language', null=True)),
|
||||
('pokemon_species', models.ForeignKey(blank=True, to='pokemon_v2.PokemonSpecies', null=True)),
|
||||
('version', models.ForeignKey(blank=True, to='pokemon_v2.Version', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonSpeciesName',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('genus', models.CharField(max_length=30)),
|
||||
('language', models.ForeignKey(blank=True, to='pokemon_v2.Language', null=True)),
|
||||
('pokemon_species', models.ForeignKey(blank=True, to='pokemon_v2.PokemonSpecies', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonStat',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('base_stat', models.IntegerField()),
|
||||
('effort', models.IntegerField()),
|
||||
('pokemon', models.ForeignKey(blank=True, to='pokemon_v2.Pokemon', null=True)),
|
||||
('stat', models.ForeignKey(blank=True, to='pokemon_v2.Stat', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PokemonType',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('slot', models.IntegerField()),
|
||||
('pokemon', models.ForeignKey(blank=True, to='pokemon_v2.Pokemon', null=True)),
|
||||
('type', models.ForeignKey(blank=True, to='pokemon_v2.Type', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='pokemonmove',
|
||||
name='pokemon_move_method',
|
||||
field=models.ForeignKey(blank=True, to='pokemon_v2.PokemonMoveMethod', null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='pokemonmove',
|
||||
name='version_group',
|
||||
field=models.ForeignKey(blank=True, to='pokemon_v2.VersionGroup', null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='pokemonevolution',
|
||||
name='evolved_species',
|
||||
field=models.ForeignKey(related_name='evolved_species', blank=True, to='pokemon_v2.PokemonSpecies', null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='pokemonevolution',
|
||||
name='gender',
|
||||
field=models.ForeignKey(blank=True, to='pokemon_v2.Gender', null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='pokemonevolution',
|
||||
name='known_move',
|
||||
field=models.ForeignKey(blank=True, to='pokemon_v2.Move', null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='pokemonevolution',
|
||||
name='known_move_type',
|
||||
field=models.ForeignKey(related_name='known_move', blank=True, to='pokemon_v2.Type', null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='pokemonevolution',
|
||||
name='party_species',
|
||||
field=models.ForeignKey(related_name='party_species', blank=True, to='pokemon_v2.PokemonSpecies', null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='pokemonevolution',
|
||||
name='party_type',
|
||||
field=models.ForeignKey(related_name='party_type', blank=True, to='pokemon_v2.Type', null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='pokemonevolution',
|
||||
name='trade_species',
|
||||
field=models.ForeignKey(related_name='trade_species', blank=True, to='pokemon_v2.PokemonSpecies', null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='pokemonegggroup',
|
||||
name='pokemon_species',
|
||||
field=models.ForeignKey(blank=True, to='pokemon_v2.PokemonSpecies', null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='pokemondexnumber',
|
||||
name='pokemon_species',
|
||||
field=models.ForeignKey(blank=True, to='pokemon_v2.PokemonSpecies', null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='pokemon',
|
||||
name='pokemon_species',
|
||||
field=models.ForeignKey(blank=True, to='pokemon_v2.PokemonSpecies', null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='pokemonspecies',
|
||||
name='forms_switchable',
|
||||
field=models.BooleanField(default=False),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='pokemonspecies',
|
||||
name='has_gender_differences',
|
||||
field=models.BooleanField(default=False),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='pokemonspecies',
|
||||
name='is_baby',
|
||||
field=models.BooleanField(default=False),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='evolutionchain',
|
||||
old_name='baby_evolution_item',
|
||||
new_name='baby_evolution_item_id',
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='evolutionchain',
|
||||
name='baby_evolution_item_id',
|
||||
field=models.IntegerField(null=True, blank=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='abilityflavortext',
|
||||
name='flavor_text',
|
||||
field=models.CharField(max_length=500),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='pokemonevolution',
|
||||
old_name='minimum_beauty',
|
||||
new_name='min_beauty',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='pokemonevolution',
|
||||
old_name='item',
|
||||
new_name='evolution_item_id',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='pokemonevolution',
|
||||
old_name='held_item',
|
||||
new_name='held_item_id',
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='pokemonevolution',
|
||||
name='evolution_item_id',
|
||||
field=models.IntegerField(null=True, blank=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='pokemonevolution',
|
||||
name='held_item_id',
|
||||
field=models.IntegerField(null=True, blank=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='pokemonevolution',
|
||||
name='location_id',
|
||||
field=models.IntegerField(null=True, blank=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='pokemonevolution',
|
||||
name='min_affection',
|
||||
field=models.IntegerField(null=True, blank=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='pokemonevolution',
|
||||
name='min_beauty',
|
||||
field=models.IntegerField(null=True, blank=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='pokemonevolution',
|
||||
name='min_happiness',
|
||||
field=models.IntegerField(null=True, blank=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='pokemonevolution',
|
||||
name='relative_physical_stats',
|
||||
field=models.IntegerField(null=True, blank=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='pokemonevolution',
|
||||
name='min_level',
|
||||
field=models.IntegerField(null=True, blank=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='pokemonevolution',
|
||||
name='time_of_day',
|
||||
field=models.CharField(max_length=10, null=True, blank=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='pokemonform',
|
||||
old_name='is_mega_form_order',
|
||||
new_name='is_mega',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='pokemonform',
|
||||
name='form_order',
|
||||
field=models.IntegerField(null=True, blank=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='pokemonform',
|
||||
old_name='introduces_in_version_group',
|
||||
new_name='introduced_in_version_group',
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='language',
|
||||
name='order',
|
||||
field=models.IntegerField(null=True, blank=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='pokemon',
|
||||
name='order',
|
||||
field=models.IntegerField(null=True, blank=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='pokemonform',
|
||||
name='order',
|
||||
field=models.IntegerField(null=True, blank=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='pokemonmove',
|
||||
name='order',
|
||||
field=models.IntegerField(null=True, blank=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='pokemonspecies',
|
||||
name='order',
|
||||
field=models.IntegerField(null=True, blank=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='versiongroup',
|
||||
name='order',
|
||||
field=models.IntegerField(null=True, blank=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Machine',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('machine_number', models.IntegerField()),
|
||||
('item_id', models.IntegerField()),
|
||||
('growth_rate', models.ForeignKey(blank=True, to='pokemon_v2.GrowthRate', null=True)),
|
||||
('move', models.ForeignKey(blank=True, to='pokemon_v2.Move', null=True)),
|
||||
('version_group', models.ForeignKey(blank=True, to='pokemon_v2.VersionGroup', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
]
|
|
@ -24,15 +24,7 @@ class HasCharacteristic(models.Model):
|
|||
|
||||
class HasDescription(models.Model):
|
||||
|
||||
description = models.CharField(max_length=1000, default='')
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
|
||||
class HasGender(models.Model):
|
||||
|
||||
gender = models.ForeignKey('Gender', blank=True, null=True)
|
||||
description = models.CharField(max_length=200, default='')
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
@ -46,17 +38,9 @@ class HasEggGroup(models.Model):
|
|||
abstract = True
|
||||
|
||||
|
||||
class HasEvolutionTrigger(models.Model):
|
||||
|
||||
evolution_trigger = models.ForeignKey('EvolutionTrigger', blank=True, null=True)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
|
||||
class HasFlavorText(models.Model):
|
||||
|
||||
flavor_text = models.CharField(max_length=500)
|
||||
flavor_text = models.CharField(max_length=200)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
@ -168,71 +152,7 @@ class HasNature(models.Model):
|
|||
|
||||
class HasOrder(models.Model):
|
||||
|
||||
order = models.IntegerField(blank=True, null=True)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
|
||||
class HasPokedex(models.Model):
|
||||
|
||||
pokedex = models.ForeignKey('Pokedex', blank=True, null=True)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
|
||||
class HasPokemon(models.Model):
|
||||
|
||||
pokemon = models.ForeignKey('Pokemon', blank=True, null=True)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
|
||||
class HasPokemonColor(models.Model):
|
||||
|
||||
pokemon_color = models.ForeignKey('PokemonColor', blank=True, null=True)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
|
||||
class HasPokemonForm(models.Model):
|
||||
|
||||
pokemon_form = models.ForeignKey('PokemonForm', blank=True, null=True)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
|
||||
class HasPokemonHabitat(models.Model):
|
||||
|
||||
pokemon_habitat = models.ForeignKey('PokemonHabitat', blank=True, null=True)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
|
||||
class HasPokemonMoveMethod(models.Model):
|
||||
|
||||
pokemon_move_method = models.ForeignKey('PokemonMoveMethod', blank=True, null=True)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
|
||||
class HasPokemonShape(models.Model):
|
||||
|
||||
pokemon_shape = models.ForeignKey('PokemonShape', blank=True, null=True)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
|
||||
class HasPokemonSpecies(models.Model):
|
||||
|
||||
pokemon_species = models.ForeignKey('PokemonSpecies', blank=True, null=True)
|
||||
order = models.IntegerField()
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
@ -254,17 +174,15 @@ class HasType(models.Model):
|
|||
abstract = True
|
||||
|
||||
|
||||
class HasVersion(models.Model):
|
||||
class HasVersionGroup(models.Model):
|
||||
|
||||
version = models.ForeignKey('Version', blank=True, null=True)
|
||||
version_group = models.ForeignKey('VersionGroup', blank=True, null=True)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
|
||||
class HasVersionGroup(models.Model):
|
||||
|
||||
version_group = models.ForeignKey('VersionGroup', blank=True, null=True)
|
||||
class IsName(HasLanguage, HasName):
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
@ -305,7 +223,6 @@ class IsFlavorText(HasLanguage, HasFlavorText):
|
|||
class Version(HasName, HasVersionGroup):
|
||||
pass
|
||||
|
||||
|
||||
class VersionName(IsName):
|
||||
|
||||
version = models.ForeignKey('Version', blank=True, null=True)
|
||||
|
@ -380,17 +297,6 @@ class AbilityName(IsName, HasAbility):
|
|||
pass
|
||||
|
||||
|
||||
class AbilityChange(HasAbility):
|
||||
pass
|
||||
|
||||
|
||||
class AbilityChangeDescription(HasLanguage):
|
||||
|
||||
ability_change = models.ForeignKey(AbilityChange, blank=True, null=True)
|
||||
|
||||
effect = models.CharField(max_length=1000)
|
||||
|
||||
|
||||
|
||||
#################
|
||||
# TYPE MODELS #
|
||||
|
@ -683,272 +589,3 @@ class MoveMetaCategoryDescription(HasMetaCategory, IsDescription):
|
|||
class MoveMetaStatChange(HasMove, HasStat):
|
||||
|
||||
change = models.IntegerField()
|
||||
|
||||
|
||||
|
||||
#######################
|
||||
# EXPERIENCE MODELS #
|
||||
#######################
|
||||
|
||||
class Experience(HasGrowthRate):
|
||||
|
||||
level = models.IntegerField()
|
||||
|
||||
experience = models.IntegerField()
|
||||
|
||||
|
||||
|
||||
###################
|
||||
# GENDER MODELS #
|
||||
###################
|
||||
|
||||
class Gender(HasName):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
####################
|
||||
# MACHINE MODELS #
|
||||
####################
|
||||
|
||||
class Machine(HasGrowthRate):
|
||||
|
||||
machine_number = models.IntegerField()
|
||||
|
||||
version_group = models.ForeignKey(VersionGroup, blank=True, null=True)
|
||||
|
||||
item_id = models.IntegerField()
|
||||
|
||||
move = models.ForeignKey(Move, blank=True, null=True)
|
||||
|
||||
|
||||
|
||||
######################
|
||||
# EVOLUTION MODELS #
|
||||
######################
|
||||
|
||||
class EvolutionChain(models.Model):
|
||||
|
||||
baby_evolution_item_id = models.IntegerField(blank=True, null=True) #Just for now. Need Item models
|
||||
|
||||
|
||||
class EvolutionTrigger(HasName):
|
||||
pass
|
||||
|
||||
|
||||
class EvolutionTriggerName(HasEvolutionTrigger, IsName):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
####################
|
||||
# POKEDEX MODELS #
|
||||
####################
|
||||
|
||||
class Pokedex(HasName):
|
||||
|
||||
region_id = models.IntegerField(blank=True, null=True)
|
||||
|
||||
is_main_series = models.BooleanField(default = False)
|
||||
|
||||
|
||||
class PokedexDescription(HasPokedex, HasName, IsDescription):
|
||||
pass
|
||||
|
||||
|
||||
class PokedexVersionGroup(HasPokedex, HasVersionGroup):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
####################
|
||||
# POKEMON MODELS #
|
||||
####################
|
||||
|
||||
class PokemonSpecies(HasName, HasGeneration, HasPokemonColor,
|
||||
HasPokemonShape, HasGrowthRate, HasOrder):
|
||||
|
||||
evolves_from_species = models.ForeignKey('self', blank=True, null=True)
|
||||
|
||||
evolution_chain = models.ForeignKey(EvolutionChain, blank=True, null=True)
|
||||
|
||||
pokemon_habitat = models.ForeignKey('PokemonHabitat', blank=True, null=True)
|
||||
|
||||
gender_rate = models.IntegerField()
|
||||
|
||||
capture_rate = models.IntegerField()
|
||||
|
||||
base_happiness = models.IntegerField()
|
||||
|
||||
is_baby = models.BooleanField(default = False)
|
||||
|
||||
hatch_counter = models.IntegerField()
|
||||
|
||||
has_gender_differences = models.BooleanField(default = False)
|
||||
|
||||
forms_switchable = models.BooleanField(default = False)
|
||||
|
||||
|
||||
class PokemonSpeciesName(IsName, HasPokemonSpecies):
|
||||
|
||||
genus = models.CharField(max_length = 30)
|
||||
|
||||
|
||||
class PokemonSpeciesDescription(HasPokemonSpecies, IsDescription):
|
||||
pass
|
||||
|
||||
|
||||
class PokemonSpeciesFlavorText(IsFlavorText, HasPokemonSpecies, HasVersion):
|
||||
pass
|
||||
|
||||
|
||||
class Pokemon(HasName, HasPokemonSpecies, HasOrder):
|
||||
|
||||
height = models.IntegerField()
|
||||
|
||||
weight = models.IntegerField()
|
||||
|
||||
base_experience = models.IntegerField()
|
||||
|
||||
is_default = models.BooleanField(default = False)
|
||||
|
||||
|
||||
class PokemonAbility(HasPokemon, HasAbility):
|
||||
|
||||
is_hidden = models.BooleanField(default = False)
|
||||
|
||||
slot = models.IntegerField()
|
||||
|
||||
|
||||
class PokemonColor(HasName):
|
||||
pass
|
||||
|
||||
|
||||
class PokemonColorName(HasPokemonColor, IsName):
|
||||
pass
|
||||
|
||||
|
||||
class PokemonDexNumber(HasPokemonSpecies, HasPokedex):
|
||||
|
||||
pokedex_number = models.IntegerField()
|
||||
|
||||
|
||||
class PokemonEggGroup(HasPokemonSpecies, HasEggGroup):
|
||||
pass
|
||||
|
||||
|
||||
class PokemonEvolution(HasEvolutionTrigger, HasGender):
|
||||
|
||||
evolution_item_id = models.IntegerField(blank=True, null=True) # need item tables
|
||||
|
||||
evolved_species = models.ForeignKey(PokemonSpecies, related_name="evolved_species", blank=True, null=True)
|
||||
|
||||
min_level = models.IntegerField(blank=True, null=True)
|
||||
|
||||
location_id = models.IntegerField(blank=True, null=True) # need location tables
|
||||
|
||||
held_item_id = models.IntegerField(blank=True, null=True) # need item tables
|
||||
|
||||
time_of_day = models.CharField(max_length = 10, blank=True, null=True)
|
||||
|
||||
known_move = models.ForeignKey(Move, blank=True, null=True)
|
||||
|
||||
known_move_type = models.ForeignKey(Type, related_name="known_move", blank=True, null=True)
|
||||
|
||||
min_happiness = models.IntegerField(blank=True, null=True)
|
||||
|
||||
min_beauty = models.IntegerField(blank=True, null=True)
|
||||
|
||||
min_affection = models.IntegerField(blank=True, null=True)
|
||||
|
||||
relative_physical_stats = models.IntegerField(blank=True, null=True)
|
||||
|
||||
party_species = models.ForeignKey(PokemonSpecies, related_name="party_species", blank=True, null=True)
|
||||
|
||||
party_type = models.ForeignKey(Type, related_name="party_type", blank=True, null=True)
|
||||
|
||||
trade_species = models.ForeignKey(PokemonSpecies, related_name="trade_species", blank=True, null=True)
|
||||
|
||||
needs_overworld_rain = models.BooleanField(default = False)
|
||||
|
||||
turn_upside_down = models.BooleanField(default = False)
|
||||
|
||||
|
||||
class PokemonForm(HasName, HasPokemon, HasOrder):
|
||||
|
||||
form_identifier = models.CharField(max_length = 30)
|
||||
|
||||
introduced_in_version_group = models.ForeignKey(VersionGroup, blank=True, null=True)
|
||||
|
||||
is_default = models.BooleanField(default = False)
|
||||
|
||||
is_battle_only = models.BooleanField(default = False)
|
||||
|
||||
is_mega = models.BooleanField(default = False)
|
||||
|
||||
form_order = models.IntegerField(blank=True, null=True)
|
||||
|
||||
|
||||
class PokemonFormGeneration(HasPokemonForm, HasGeneration, HasGameIndex):
|
||||
pass
|
||||
|
||||
|
||||
class PokemonFormName(HasPokemonForm, IsName):
|
||||
|
||||
pokemon_name = models.CharField(max_length = 30)
|
||||
|
||||
|
||||
class PokemonGameIndex(HasPokemon, HasGameIndex, HasVersion):
|
||||
pass
|
||||
|
||||
|
||||
class PokemonHabitat(HasName):
|
||||
pass
|
||||
|
||||
|
||||
class PokemonHabitatName(IsName):
|
||||
|
||||
pokemon_habitat = models.ForeignKey(PokemonHabitat, blank=True, null=True)
|
||||
|
||||
|
||||
class PokemonItem(HasPokemon, HasVersion):
|
||||
|
||||
item_id = models.IntegerField()
|
||||
|
||||
rarity = models.IntegerField()
|
||||
|
||||
|
||||
class PokemonMoveMethod(HasName):
|
||||
pass
|
||||
|
||||
|
||||
class PokemonMoveMethodName(IsName, HasPokemonMoveMethod, HasDescription):
|
||||
pass
|
||||
|
||||
|
||||
class PokemonMove(HasPokemon, HasPokemonMoveMethod, HasVersionGroup, HasMove, HasOrder):
|
||||
|
||||
level = models.IntegerField()
|
||||
|
||||
|
||||
class PokemonShape(HasName):
|
||||
pass
|
||||
|
||||
|
||||
class PokemonShapeName(IsName):
|
||||
|
||||
awesome_name = models.CharField(max_length = 30)
|
||||
|
||||
pokemon_shape = models.ForeignKey(PokemonShape, blank=True, null=True)
|
||||
|
||||
|
||||
class PokemonStat(HasPokemon, HasStat):
|
||||
|
||||
base_stat = models.IntegerField()
|
||||
|
||||
effort = models.IntegerField()
|
||||
|
||||
|
||||
class PokemonType(HasPokemon, HasType):
|
||||
|
||||
slot = models.IntegerField()
|
||||
|
|
Loading…
Reference in a new issue