Commit graph

307 commits

Author SHA1 Message Date
Eevee (Lexy Munroe)
aa92ccb7ad Make the schema minimally usable on Python 3 2016-11-21 19:27:28 -08:00
Andrew Ekstedt
7d1b8cc4f8 Improve table docs w.r.t. ids and game indices.
Went though the table docs and noted which tables have ids that correspond
to game ids, and explained why we sometimes have ids in the 10000s.

Since docs attached to id columns aren't displayed in the web documentation,
these edits all go in the class docstring, and i took the liberty of deleting
the id column docs from every table i touched.

Also: added some words about how to get to the species from pokemon and
pokemon_form.

Also: note that item flags are not official (they are a holdover from
brownkun) and item pockets are sort of kind of official (they originated from
D/P i believe, but i'm not sure how we've been assigning them for newer items).

Pertains to #99.
2015-06-17 16:38:16 -07:00
Andrew Ekstedt
76ad6391fc Document Type.target_efficacies and Type.damage_efficacies.
I can't keep them straight.
2015-05-24 23:12:21 -07:00
Lynn "Zhorken" Vaughan
7ddecd527d Call characteristics "characteristics". #132 2014-07-28 19:01:33 -04:00
Petr Viktorin
df945eb601 Fix drain/recoil name in MoveMeta
The column was named recoil, but positive values meant
drain.
Rename the column, and introduce a hybrid property for
recoil.
2014-07-09 10:47:36 -07:00
Andrew Ekstedt
29824c73f4 Tweak Pokemon width/height docstrings 2014-07-06 12:17:11 -07:00
Andrew Ekstedt
5f54b3057d Fix PokemonForm.form_order docstring 2014-07-06 12:17:11 -07:00
Andrew Ekstedt
19d7335399 Remove some lies about encounter slots 2014-07-05 16:50:43 -07:00
Andrew Ekstedt
159eea093a Address some XXX comments 2014-07-05 16:50:24 -07:00
Andrew Ekstedt
cd04629404 PEP 257, yo
Put the closing quote of single-line docstrings on the same line, and
end with a period.

Just tables.py for now.
2014-07-05 16:48:58 -07:00
Andrew Ekstedt
6f5abb9540 Put column descriptions where they belong
The Column class accepts a 'doc' argument. Use it.

And while we're at it, make them all unicode strings.

Performed by the following sed script:

   s/info=dict(description=u\?\("[^"]*"\))/doc=u\1/
   s/info=dict(description=u\?\('[^']*'\))/doc=u\1/
   s/\(\s*\)info=dict(description=u\?\("[^"]*"\), /\1doc=u\2,\n\1info=dict(/
   s/\(\s*\)info=dict(description=u\?\('[^']*'\), /\1doc=u\2,\n\1info=dict(/

   /info=dict(description=u\?\('[^']*'\),$/ {
       s//doc=u\1,/
       n
       s/^\s*/&info=dict(/
   }
2014-07-05 16:46:37 -07:00
Andrew Ekstedt
195cdd2ea2 Fix typos in table docs
Also, remove a stray detail=True from an info dict.
2014-07-04 12:43:03 -07:00
Andrew Ekstedt
16c1d2c278 Fix natures.game_index 2014-07-03 17:25:26 -07:00
Andrew Ekstedt
341f6bbc83 Add internal IDs for types 2014-07-03 16:55:33 -07:00
Lynn "Zhorken" Vaughan
f4b73bcd5a Clarify that natures.game_index is 1-indexed.
Given that nature was determined by pid % 25 for a long time, I think
this is important to note.
2014-06-21 22:50:12 -04:00
Lynn "Zhorken" Vaughan
a71e4a2c13 Add game indices for natures.
I'm assuming (and I'm 99% sure I'm right) that the internal order for
natures has never changed.
2014-06-21 22:27:56 -04:00
Andrew Ekstedt
8d42445ae0 Fix typo in Machine.machine_number docstring. 2014-05-19 21:31:58 -07:00
Lynn "Zhorken" Vaughan
2626cf6304 Use null power instead of 0/1 power.
<Zhorken> I'd like to motion (again) that 0 and 1 power both be stored
    as null
<Zhorken> and — or * be displayed based on damage class
<Zhorken> which is what determines 0 vs 1 anyway, with the arbitrary
    who-fucking-cares exception of Me First
<eevee> the ayes have it
<Zhorken> awesome
<eevee> that's a good idea i don't remember its being motioned the
    first time
<Zhorken> I definitely remember arguing it when B/W released
2014-05-19 21:37:48 -04:00
Andrew Ekstedt
99184a6fde Knock Unicode(256) down to Unicode(79)
MySQL again. Indexed keys have a maximum length of 767 bytes and unicode
is stored as 3 bytes per character. Since 256*3 = 768, that pushes us
just past the limit. Could lower the length to 255 characters, but let's
go further - currently only names and identifers have a length limit,
and if a name or identifier doesn't fit in a terminal then i don't want
to see it.

Fixes issue #123.
2014-05-13 23:26:07 -07:00
Andrew Ekstedt
9e3bfd7971 Use Unicode(256) for names and identifiers.
MySQL requires that text columns that are indexed or used as keys be
given a maximum length.

256 bytes should be enough for anyone.
2014-03-13 00:29:49 -07:00
Lynn "Zhorken" Vaughan
7462c0fc1b Put short_effect before effect in ability_prose.
This way it matches /all the other prose tables/.  Relatedly, all the
abilities I recently expanded on had short_effect and effect swapped,
so I fixed that too.
2014-03-12 12:18:37 -04:00
Lynn "Zhorken" Vaughan
308f5f4ed9 Use UnicodeText for all text columns. 2014-03-11 20:15:16 -04:00
Lynn "Zhorken" Vaughan
5b759feaa2 Sort out all the non-nullable columns with empty values. 2014-02-21 17:48:19 -05:00
Epithumia
7b2743be75 Dynamically mangle long table names for Oracle; Unicode → UnicodeText. 2014-02-21 17:47:55 -05:00
Andrew Ekstedt
717e52b66a Limit Unicode columns to 4000 characters. Fixes #102.
This is the maximum length of an NVARCHAR column in SQL Server 2012.[1]

Our longest bit of prose is currently Substitute's effect, at 3180
characters.

[1]: http://technet.microsoft.com/en-us/library/ms186939.aspx
2013-11-16 16:50:15 -08:00
Andrew Ekstedt
7bb20406b7 Don't import * from sqlalchemy.types 2013-11-16 16:03:37 -08:00
Lynn "Zhorken" Vaughan
5ec50ea26c Make the rest of the tests pass. 2013-11-09 03:49:09 -05:00
Lynn "Zhorken" Vaughan
9394c747cb Add new evolution info. 2013-11-06 11:51:44 -05:00
Lynn "Zhorken" Vaughan
66071291a6 Split Pokédex version groups into their own table again.
spline-pokedex doesn't need to adapt; Pokedex.version_groups looks the
same as always and VersionGroup.pokedex wasn't used anywhere.
2013-11-06 09:47:49 -05:00
Lynn "Zhorken" Vaughan
136359cf4a Tweak a couple new ability descriptions. 2013-11-05 11:27:09 -05:00
Andrew Ekstedt
e151162a8b Add identifiers for version groups. 2013-11-01 14:34:51 -07:00
Andrew Ekstedt
94f120421c Add Pokemon.base_stat method. 2013-10-31 16:08:32 -07:00
Andrew Ekstedt
b412bfaa8e Add is_mega column to pokemon_forms. 2013-10-28 12:21:58 -07:00
Lynn "Zhorken" Vaughan
3a117f8dfd Add identifiers for pokemon and pokemon_forms. 2013-10-28 03:14:36 -04:00
Andrew Ekstedt
95fec6065f Remove another innerjoin.
Shadow moves have no MoveMeta.
2013-10-27 15:31:20 -07:00
Andrew Ekstedt
fdf87cf8ce Remove some innerjoins which no longer hold. 2013-10-19 15:22:16 -07:00
Andrew Ekstedt
38ce28e48f Drop Generation.canonical_pokedex.
Generation VI doesn't have a canonical pokedex (it has three). We don't
use this anywhere and as far as i can tell we never have. We can revive
it in another form if and when we find we need it.

Conflicts:
	pokedex/data/csv/generations.csv
	pokedex/db/tables.py
2013-10-18 18:58:07 -07:00
Eevee (Alex Munroe)
d667024937 Force MySQL to NOT auto-inc pokemon_moves.level. 2013-08-12 23:15:03 -07:00
Lynn "Zhorken" Vaughan
e0beddc573 Add an is_main_series column to abilities. 2013-07-04 03:50:34 -04:00
Lynn "Zhorken" Vaughan
501a5ce74f Ditch server_default in conquest_pokemon_evolution. #96 2013-03-17 02:18:11 -04:00
Eevee
1cee46f0c0 Add a length back to color names; breaks MySQL otherwise. 2013-03-10 13:56:42 -07:00
Eevee
439eeffdd2 Why does color name have a length limit? I am stupid. 2013-02-07 00:47:07 -08:00
Lynn "Zhorken" Vaughan
9c72fe73e0 Add a VersionGroup.pokemon_moves relation. 2012-11-18 16:01:24 -05:00
Eevee
59dfb885e1 Add a couple more pokemon -> ability accessors. 2012-11-17 04:12:54 -08:00
Lynn "Zhorken" Vaughan
7f781db1d7 Change "dream ability" to "hidden ability". 2012-11-04 19:03:11 -05:00
Lynn "Zhorken" Vaughan
1d3e5af093 Switch pokemon_game_indices to version_id; add B/W 2 indices.
version_id rather than version_group_id for the sake of FR/LG Deoxys.
It seems a little silly but magical's on board with this decision too.
2012-11-03 03:51:29 -04:00
Andrew Ekstedt
ca5b7a9cbf Add B/W encounter methods and conditions
Spots: it might seem like they should be conditions, but in practice
they behave more like methods. Specifically, conditions typically make
only minor changes to an encounter list. Spots change everything.
So spots are added as methods, with each type of spot as a separate
method. Not exactly ideal, but this causes the least fuss.

Seasons work fine as conditions.

Well, as well as time-of-day.
2012-09-28 23:00:53 -07:00
Andrew Ekstedt
c5fee20ef1 Make Encounter.condition_values a relationship(). 2012-09-27 12:59:16 -07:00
Lynn "Zhorken" Vaughan
c3f2919ef3 Minor cleanup in tables.py to make tests pass. 2012-09-25 21:18:53 -04:00
Lynn "Zhorken" Vaughan
765be26405 Add episodes and warrior transformation info. 2012-08-17 01:50:09 -04:00