I've gotten started on this, though still quite a ways from having a URL or
code to share.  One thing that's come up is the issue of enums in the
database schema.  We currently use these in a number of places (province,
player class, even yes/no values), but they are not part of ANSI-standard
SQL, and are not supported by (at least) MS-SQL (not sure about the latest
version).  As such, they are also not well supported by the auto-generated
code that CakePHP builds.  I see three options for proceeding.

1. Leave the enum columns alone, and make changes as required to the
auto-generated code.  There are lots of changes to be made anyway, so this
is not a big deal.  However, the result will not necessarily be as
database-independent as it could be.

2. Change the enum columns to strings (or bools, where appropriate).  This
is a straight-forward database conversion, but the resulting database will
be larger.  Lists of available strings would be added in a configuration
file, making it easy to update the options as necessary (no database changes
required).  The changes to the auto-generated code required in option 1
would still be required here.

3. Change the enum columns to ints referencing new tables (e.g. there would
be tables called provinces, player_classes, etc.).  This keeps the database
small, but adds a bunch of new tables.  On the other hand, some of these
tables now become things that can be easily edited through the app, if
appropriate.  The auto-generated code would (I believe, I need to verify
this) handle this option without changes.

Thoughts?  I'm about 10-40-50% in favour of these, respectively, at the
moment.

Greg.

_______________________________________________
Leaguerunner mailing list
[email protected]
http://www.dmo.ca/cgi-bin/mailman/listinfo/leaguerunner

Reply via email to