Commit Graph

19 Commits

Author SHA1 Message Date
Mike Bayer 8340006dd7 - a fair amount of cleanup to the schema package, removal of ambiguous
methods, methods that are no longer needed.  slightly more constrained
useage, greater emphasis on explicitness.
- table_iterator signature fixup, includes fix for [ticket:288]
- the "primary_key" attribute of Table and other selectables becomes
a setlike ColumnCollection object; is no longer ordered or numerically
indexed.  a comparison clause between two pks that are derived from the
same underlying tables (i.e. such as two Alias objects) can be generated
via table1.primary_key==table2.primary_key
- append_item() methods removed from Table and Column; preferably
construct Table/Column/related objects inline, but if needed use
append_column(), append_foreign_key(), append_constraint(), etc.
- table.create() no longer returns the Table object, instead has no
return value.  the usual case is that tables are created via metadata,
which is preferable since it will handle table dependencies.
- added UniqueConstraint (goes at Table level), CheckConstraint
(goes at Table or Column level) fixes [ticket:217]
- index=False/unique=True on Column now creates a UniqueConstraint,
index=True/unique=False creates a plain Index,
index=True/unique=True on Column creates a unique Index.  'index'
and 'unique' keyword arguments to column are now boolean only; for
explcit names and groupings of indexes or unique constraints, use the
UniqueConstraint/Index constructs explicitly.
- relationship of Metadata/Table/SchemaGenerator/Dropper has been
improved so that the schemavisitor receives the metadata object
for greater control over groupings of creates/drops.
- added "use_alter" argument to ForeignKey, ForeignKeyConstraint,
but it doesnt do anything yet.  will utilize new generator/dropper
behavior to implement.
2006-10-14 21:58:04 +00:00
Mike Bayer 51f16d1498 - the "foreign_key" attribute on Column and ColumnElement in general
is deprecated, in favor of the "foreign_keys" list/set-based attribute,
    which takes into account multiple foreign keys on one column.
    "foreign_key" will return the first element in the "foreign_keys" list/set
    or None if the list is empty.
- added a user test to the relationships test, testing various new things this
change allows
2006-10-08 02:46:40 +00:00
Mike Bayer 8a1706b494 - fixed condition that occurred during reflection when a primary key
column was explciitly overridden, where the PrimaryKeyConstraint would
    get both the reflected and the programmatic column doubled up
2006-09-30 16:26:52 +00:00
Mike Bayer 7b82393355 sequence/default adjustments to allow postgres 8.1 tests to function 2006-08-31 23:33:55 +00:00
Mike Bayer d0a3313edf - postgres reflection moved to use pg_schema tables, can be overridden
with use_information_schema=True argument to create_engine
[ticket:60], [ticket:71]
- added natural_case argument to Table, Column, semi-experimental
flag for use with table reflection to help with quoting rules
[ticket:155]
2006-08-21 00:37:34 +00:00
Mike Bayer bd04cffad8 more fixes for [ticket:269], added MSMediumBlob type 2006-08-18 00:49:57 +00:00
Mike Bayer 698725a1a9 [ticket:277] check if pg/oracle sequence exists. checks in all cases before CREATE SEQUENCE/ DROP SEQUENCE 2006-08-16 19:48:24 +00:00
Mike Bayer 26efe4f643 fixes to types so that database-specific types more easily used;
fixes to mysql text types to work with this methodology
[ticket:269]
2006-08-12 19:50:07 +00:00
Mike Bayer 4e033e73f3 turned off default case-folding rules as they wreak havoc with the current unittests,
temporary isintance() checks in ASNIIdentifierPreparer which will be replaced with visit_
methodology
2006-08-12 17:53:04 +00:00
Mike Bayer aaefbb7e04 - better check for ambiguous join conditions in sql.Join; propigates to a
better error message in PropertyLoader (i.e. relation()/backref()) for when
the join condition can't be reasonably determined.
- sqlite creates ForeignKeyConstraint objects properly upon table
reflection.
2006-08-03 00:28:57 +00:00
Mike Bayer 946984d812 fixed reflection of foreign keys to autoload the referenced table
if it was not loaded already, affected postgres, mysql, oracle.
fixes the latest in [ticket:105]
2006-07-22 06:21:58 +00:00
Mike Bayer 934ac330ea added table.exists() 2006-07-19 22:20:49 +00:00
Mike Bayer 8b50115acc added 'checkfirst' argument to table.create()/table.drop()
some 0.2.6 prep
2006-07-19 22:13:29 +00:00
Mike Bayer bc6fbfa84a overhaul to schema, addition of ForeignKeyConstraint/
PrimaryKeyConstraint objects (also UniqueConstraint not
completed yet).  table creation and reflection modified
to be more oriented towards these new table-level objects.
reflection for sqlite/postgres/mysql supports composite
foreign keys; oracle/mssql/firebird not converted yet.
2006-07-14 20:06:09 +00:00
Mike Bayer b3927fbb88 inserting './lib/' into sys.path since PYTHONPATH no longer straightforward with latest setuptools 2006-06-29 00:28:55 +00:00
Mike Bayer f6718830bf unsupported unit test on mysql 2006-06-16 19:28:36 +00:00
Mike Bayer d37d8681e4 fixed bug where tables with schema name werent getting indexed in metadata correctly 2006-06-06 16:38:30 +00:00
Mike Bayer bdb41655d1 added "NonExistentTable" exception throw to reflection, courtesy lbruno@republico.estv.ipv.pt, for [ticket:138] 2006-06-06 00:11:54 +00:00
Mike Bayer 120dcee5a7 reorganized unit tests into subdirectories 2006-06-05 17:25:51 +00:00