Commit graph

21 commits

Author SHA1 Message Date
John T. Wodder II c3f566b2c9 Addressed all of pyflakes3's complaints 2016-11-24 21:29:58 +00:00
Lynn "Zhorken" Vaughan f54a4caaca General code tidying for this Oracle fix. 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
Eevee 08bfd753e0 Fix default language assignment once and for all.
Stop trying to be clever and magical and just make the caller pass in a
damn primary key.
2011-04-10 00:54:14 -07:00
Eevee 8e2ad429d9 hurp durp default language 2011-04-05 23:34:28 -07:00
Eevee 905f5b3d13 Merge remote-tracking branch 'origin/encounters-i18n'
Conflicts:
	pokedex/db/__init__.py
2011-04-05 22:32:51 -07:00
Eevee 5b0f290ec5 Unbreak db.connect(), whoops. 2011-04-05 21:46:11 -07:00
Eevee 9441ffb165 Remove the responsibility of setting a default language from multilang.
Caller now has to do it.  No need to avoid circular deps, no need to do
much of anything at all.
2011-04-05 21:03:41 -07:00
a_magical_me dbb293e727 Add identifier_from_name() function.
Adapted from name2ident() in scripts/migration-i18n.py.
2011-04-03 15:32:11 -07:00
a_magical_me bbb7cb9907 Make load.py more idiomatic.
Also snuck an idiom into db/__init__.py.
2011-04-03 04:26:45 -07:00
Eevee 825d40c51e Match default language by id, not identifier. 2011-03-29 20:15:41 -07:00
Eevee 68e14e663e Started switching to create_translation_table.
- Moved the function to its own file.
- Implemented the session-based default language switching.
- Migrated a couple tables.
2011-03-21 22:32:52 -07:00
Petr Viktorin 980ae01d10 Fix connect() without arguments 2011-03-13 15:43:01 -07:00
Eevee 96c5c6a09f Use engine_from_config for database connections. #390 2011-02-09 23:39:03 -08:00
a_magical_me ffc30bff8f Factor out logic for finding the default db/index. #180
Note: `if not x:` has changed to `if x is not None:`, changing the
semantics slightly.  Shouldn't be a big issue.
2010-05-13 21:45:51 -07:00
Eevee 5e52bef91a Make plumbing respect the same env vars as the CLI. #180 2010-05-12 23:23:05 -07:00
Eevee a89a616203 Allow passing engine arguments to connect(). 2010-03-17 00:44:33 -07:00
Eevee 1a7d046fbc Vastly improved the pokedex import/export UI.
csvimport is now load; csvexport is now dump.

Both take an optional -e switch to specify an engine, but will happily
use a default SQLite database in the pokedex package directory.

Additionally, the CSV directory is now controlled by the optional -d
switch, and defaults to Doing The Right Thing.

So `pokedex load` now does exactly what you'd expect: loads the data
from the right files into a consistently-located database.
2009-08-18 18:02:53 -07:00
Eevee 634ef3ed1e Fixed a slew of foriegn key import problems. #29
Curse's type_id was 0, which is bogus; this has been fixed by creating a
real ????? type.
Fourth-gen moves all had zero as a contest effect id, which was also
bogus.
Pokémon 494 and 495 were junk and have been scrapped entirely.
pokemon_form_groups's description column was too short.

pokedex's connect() now takes kwargs passed to sessionmaker().

A more major change: some tables, like pokemon, are self-referential and
contain rows that refer to rows later in the table (for example, Pikachu
evolves from Pichu, which has a higher id).  At the moment such a row is
loaded, the foreign key is thus bogus.  I solved this by turning on
autocommit and wrapping add() in a try block, then attempting to readd
every failed row again after the rest of the table is finished.  Slows
the import down a bit, but makes it work perfectly with foreign key
checks on.
2009-07-03 23:12:13 -04:00
Eevee 20c9c23f51 Fixed some MySQL import problems.
Tables weren't being defined as UTF-8 if that wasn't the server default.

A lot of tables were trying to create erroneous auto_increment columns.

Foreign key checks were pretty much fucking everything up.
2009-03-07 18:54:01 -08:00
Eevee bad044d1d8 Initial commit, with much of the data imported.
Includes a wrapper script 'pokedex' that can, so far, read data from a
db and spit out CSVs or deploy CSVs to a db.
2009-02-05 00:05:42 -08:00