Alzabo
view release on metacpan or search on metacpan
- The change in 0.8902 to not use UNIVERSAL::isa exposed a bug in the
handling of an attempt to load a row which doesn't exist in the
DBMS. Reported by Jon Prettyman.
0.8902 Nov 9, 2006
BUG FIXES:
- Make Alzabo "safe" to use with UNIVERSAL::can (the module), which
spits out lots of warning if you use Alzabo after it has been
loaded.
- Fixed a warning from DBI in the 03-runtime.t tests.
- Fixed reverse engineering of nextval() as a column default with Pg.
0.8901 Jul 19, 2006
BUG FIXES:
- Fix reverse engineering of "now()" as default for a column with Pg.
0.89 Jun 20, 2006
ENHANCEMENTS:
- Improved schema diffs for Postgres, particularly in the area of
comparing two columns. Now we attempt to determine if two columns
are logically equivalent, even if they might have minor variations
(INT vs INTEGER type name, 'f' versus 'false' for BOOLEAN default,
etc.).
- Added Alzabo::SQLMaker->distinct_requires_order_by_in_select for the
benefit of Pg, which requires that anything in the ORDER BY clause
show up in the SELECT when you SELECT DISTINCT. This change is
experimental, and may go away in future versions.
- Removed support for passing order_by and group_by as a hash
reference. This was deprecated in 0.59.
BUG FIXES:
- When reverse engineering a Postgres schema, Alzabo did not look for
its own sequences to determine if a column should be marked as
sequenced.
- Defer FK creation until all other DDL has been executed. This
ensures that the table to which we're referring will be available.
- When recreating a table during a SQL diff, make this an exception so
we don't do other column diff/add/drop operations on the same table.
- Fixed a test failure in 07-methodmaker.t when testing with
Postgres. This failure may not have showed up often because it came
from a test that depended on the DBMS returning rows in a speific
order by without specifying an ORDER BY.
- When a Postgres table is renamed, its sequences are also renamed.
0.8801 Mar 13, 2006
BUG FIXES:
- Quoting of PostgreSQL column defaults in DDL SQL was completely
broken.
0.88 Mar 13, 2006
ENHANCEMENTS:
- Added a new option when creating a column, "default_is_raw", which
can be used to allow for a function like NOW() as a column default.
- Added an "--automated" option for Build.PL, to force it to just use
default prereqs. Also added other options to be used with this one,
see "perl Build.PL --help" for detalis.
- The Alzabo::Driver classes will now transparently reconnect to the
DBMS if you attempt to use them in a child process after a
fork. This prevents various problems that can occur if you attempt
to share a DBI handle between two processes. One notable problem is
that the parent's DBI handle is closed when the child exits.
- Added support for (VAR)BINARY type columns in MySQL. Request by
Martin Groenemeyer. RT Ticket #16338.
BUG FIXES:
- Alzabo::Table->foreign_keys_by_table() and foreign_keys_by_column()
could return the same object more than once when using
multiple-column foreign keys. Reported by Rainer Rohmfeld. RT Ticket
#13885.
- Calling connect() on a driver object (via a schema object) with
different parameters did not reconnect if the existing handle was
still good. This was explicitly opposite what the docs said the code
was doing. RT Ticket #17942.
- Fix bug in reverse engineering function indexes in Postgres. The
reverse engineering code always ended up thinking all of the columns
in the table were used in the index.
- Fix failing MySQL test in 03-runtime.t. The problem was the test,
not the Alzabo core. Reported by Alex McLintock.
- Fixed adding too many "=cut" directives in docs generated by
Alzabo::MethodMaker.
- Fixed SQL generation for the Postgres functions CURRENT_DATE,
CURRENT_TIME, and CURRENT_TIMESTAMP, which should not have
parentheses after them.
- Documented that DATE_TRUNC() is a support Pg function in
Alzabo::SQLMaker::PostgreSQL. RT Ticket #13843.
because of this bug.
0.83 June 9, 2004
MISCELLANEOUS:
- I got fed up with the instability of CVS on Sourceforge, and am now
using a Subversion repository I host myself. See "source" page on
www.alzabo.org for details.
ENHANCEMENTS:
- All SQL-generating methods for the Alzabo::Runtime::Schema and
Alzabo::Runtime::Table classes now accept a "quote_identifiers"
parameter, which allows you to turn this on for a single query.
- Improved handling of MySQL's "default defaults" when reverse
engineering or comparing two schemas, so that the code doesn't
generate ALTER TABLE statements that don't do anything.
- Make many Params::Validate specs into constants, which may improve
speed a bit, and may affect memory usage under mod_perl. This is
probably a useless micro-optimization, though.
BUG FIXES
- Make sure generated SQL for Postgres schema diffs does not include
dropping & adding the same FK constraint more than once.
- Reverse engineering works with Postgres 7.4. Thanks to Josh Jore
for this big patch. Hopefully this won't break anything for
Postgres 7.3 ;)
- The Alzabo::Column->is_time_interval method was misspelled, and so
did not work at all. Patch from Josh Jore.
- With Postgres 7.4, the DBI tables method always includes system
tables, so we have to filter these out in the
Alzabo::Driver::PostgreSQL->tables method. Patch from Josh Jore.
- Make the is_date & is_datetime method consistent across various
databases. For Postgres, is_date was only returning true for the
DATE type, not TIMESTAMP.
- Make is_datetime return true for Postgres' TIMESTAMPTZ column type.
- Turning on SQL debugging could cause Alzabo to alter bound values
that were null to the string "NULL" before performing a query.
- If a table name was changed and an index, column, or foreign key
dropped from that table, then the generated "diff" SQL could refer
to the old table name in the various DROP statements that were
generated.
- Workaround a bug in MySQL that reports a "Sub_part" of 1 for
fulltext indexes.
- The changes introduced in 0.71 to track table and column renames
could cause bogus SQL to be generated if something was renamed, the
schema was instantiated, and then the schema was compared to an
existing live database which also had the same renaming done to it.
- If you tried to create a relationship between two tables where one
of the tables had a varchar or char column as part of its PK, and
you let Alzabo create the foreign key column in the other table,
then Alzabo would try to set the length of the varchar/char column
to undef, which would cause an exception to be thrown.
---------------------------------------------------------------------------
0.82 January 6, 2004
ENHANCEMENTS:
- The Alzabo::Runtime::Table->insert() and
Alzabo::Runtime::InsertHandle->insert() methods will not create a
new row object when called in void context. This should make
inserts faster when you don't need a row object back.
- When reverse engineering a MySQL schema, Alzabo will now set a table
attribute for the table type (MyISAM, InnoDB, etc.) if the server
supports table types (which any modern version of MySQL does do).
BUG FIXES:
- When creating the test database for MySQL, we now explicitly set the
table type to MYISAM, in case the default is something else.
Otherwise the tests will fail when we try to create a fulltext
index.
KNOWN BUGS:
- This release will fail several tests when tested with Postgres 7.4.
Specifically, reverse engineering with Postgres 7.4 is known to be
broken. This will be fixed in the next release.
---------------------------------------------------------------------------
0.81 December 21, 2003
ENHANCEMENTS:
- Added a new insert handle feature, which should be significantly
faster for batch inserts than repeatedly calling the table class's
insert() method. Development funded by Marigold Technologies.
BUG FIXES:
- An order_by parameter that contained two SQL functions (like
"COUNT(*) DESC, AVG(score) DESC") caused the error "A sort specifier
cannot follow another sort specifier in an ORDER BY clause".
- If you passed a no_cache parameter to a method that created a row,
this would cause an error unless Alzabo::Runtime::UniqueRowCache had
been loaded.
- Workaround for bug/change/something in DBD::Pg 1.31+ that affects
the $dbh->tables method, which broke reverse engineering.
cannot find a matching row. Instead it simply returns false.
- Some deprecated MethodMaker options were removed: insert, update,
lookup_table
- The Alzabo::Runtime::Row->delete() method now works for potential
rows.
---------------------------------------------------------------------------
0.73 October 5, 2003
BACKWARDS INCOMPATIBILITIES:
- This release no longer includes the Mason schema creation GUI. It
can be installed separately via the Alzabo::GUI::Mason package.
BUG FIXES:
- Fixed a bug in Alzabo::Create::Schema that only seems to be
triggered by newer Perls. The symptom was an error like "Alzabo
does not support the 'MySQL' RDBMS" when trying to create a new
schema.
- Fixed a warning in Alzabo::RDBMSRules.
- The 01-driver.t test ignored any user-supplied RDBMS connection
parameters. Reported by Barry Hoggard.
- Newer versions of MySQL may return quoted table names, which broke
reverse engineering.
- Added a quick and nasty hack to remove the schema name from table
names when reverse engineering Postgres schemas.
- Reverse engineering of indexes for MySQL 4.0+ was broken.
---------------------------------------------------------------------------
0.72 April 12, 2003
ENHANCEMENTS:
- Rewrote the complex build/install system to use Module::Build, which
simplified quite a bit of code. Additionally, this should eliminate
problems reported by Win32 users with the generated Makefile,
because there is no longer a Makefile ;)
BUG FIXES:
- Fixed the Alzabo::MethodMaker->docs_as_pod method, which simply died
when used with a recent version of Params::Validate. Reported by
Ken Williams.
---------------------------------------------------------------------------
0.71 April 6, 2003
ENHANCEMENTS:
- Alzabo now tracks table and column renames after a schema has been
instantiated. This means that when updating the schema in the
database after such a change, Alzabo can ensure that there is no
data lost because of the change. Previously, Alzabo treated name
changes as a drop followed by an add, which caused data loss.
- Alzabo::DriverStatement->next_hash has been renamed next_as_hash, in
order to be consistent with the Alzabo::Runtime::Cursor classes.
- Experimental support for restriction clauses as part of an outer
join, such as
SELECT ...
FROM Foo
LEFT OUTER JOIN Bar
ON Foo.foo_id = Bar.foo_id
AND Bar.something > 2
- Added support for HAVING in queries.
BUG FIXES:
- Exceptions did not include a stack trace.
- Trying to create a Postgres schema with foreign keys defined caused
an exception. Reported by Josh Jore.
- Fetching rows from the cursor for a join with multiple outer joins
could fail if data was being prefetched.
DEPRECATIONS:
- Alzabo::DriverStatement->next_hash method has been renamed
next_as_hash.
---------------------------------------------------------------------------
0.70 November 21, 2002
ENHANCEMENTS:
- The exception thrown when you attempt to set a non-nullable column
to NULL is now an Alzabo::Exception::NotNullable exception, instead
of an Alzabo::Exception::Params exception. In the interests of
backwards compatibility, the former is a subclass of the latter.
- Improved debugging options. See the new Alzabo::Debug module for
details.
BUG FIXES:
- Fixed Alzabo::Table->primary_key, which would die when no primary
key existed and it was called in a scalar context. In an array
context, all the columns in the table were returned. Reported by
Eric Prestemon.
- Alzabo::ObjectCache::Sync::RDBMS created a table that it would later
consider incorrect. This made this module unusable.
- Alzabo::ObjectCache::Sync::RDBMS caused weird random errors when
used with MySQL's InnoDB tables.
- In the schema creator, the link to the graph page, and the link _on_
the graph page to the image, were both broken.
- Alzabo was allowing you to rename a column to the name of an
existing column in a table. Similarly, a table could be renamed to
the same name as an existing table. Doing this could trash a
schema.
- Alzabo::Runtime::Table->one_row would return undef if no row was
found, which in a list context evaluated to a true value.
- Allow no_cache option when calling Alzabo::Runtime::Schema->join.
- When displaying SQL, the schema creator now makes sure to
HTML-escape it, because it's possible to have HTML in there (in a
default, most likely).
- The "children" method generated by Alzabo::MethodMaker did not allow
you to add additional where clause constraints to the query.
---------------------------------------------------------------------------
0.69 September 19, 2002
ENHANCEMENTS:
- Add count method to Alzabo::DriverStatement objects.
BUG FIXES:
- ** A particularly nasty bug sometimes manifested itself when
removing a foreign key. This bug caused the deletion of all foreign
keys involving the _corresponding_ column(s) in the foreign table.
Needless to say, this could make a big mess.
- Fix some typos in the generated docs created by Alzabo::MethodMaker.
- A join that included a where clause with an 'OR' generated improper
SQL. Reported by Ilya Martynov.
- Calling the Alzabo::Runtime::JoinCursor->next_as_hash method when
the query involved an outer join could cause a runtime error.
- In where clause specifications, 'and' and 'or' were only being
allowed in lower-case. They are now allowed in any case.
- Aliases did not work in outer joins. This has been fixed.
- Using outer joins was a bit fragile, in that the order of the outer
join in the context of the other joins could cause Alzabo to
generate incorrect SQL. Now outer joins should work no matter what.
- A couple links in the schema creator had a hardcoded ".mhtml"
extension, as opposed to using the value of
Alzabo::Config::mason_extension(). Patch by Scott Lanning.
---------------------------------------------------------------------------
0.68 July 20, 2002
ENHANCEMENTS:
- Updated the thank you list in the README file (you too can be listed
by sending me useful bug reports, patches, suggestions, or reminding
that you already did so and I forgot ;)
BUG FIXES:
- There were some broken bits in the installation code in 0.66. These
are now fixed.
---------------------------------------------------------------------------
0.66 June 6, 2002
ENHANCEMENTS:
- It is now possible to retrieve auto-generated documentation to go
along with the methods generated by Alzabo::MethodMaker. See the
"GENERATED DOCUMENTATION" section of the Alzabo::MethodMaker docs
for more details.
- Added documentation to all the components in mason/widgets. You can
run perldoc on those files for more details.
- Added a very ugly hack to work around a bug with Storable 2.00 -
2.03 and a Perl < 5.8.0.
- It is now possible to install Alzabo without defining an Alzabo root
directory. This means you will have to set this by calling
Alzabo::Config::root_dir() every time you load Alzabo. An attempt
to load a schema without first defining the root_dir will throw an
exception. Based on a patch from Ilya Martynov.
BUG FIXES:
- Allow UNIQUE as a column attribute for Postgres. Reported by Dan
Martinez.
- Add DISTINCT back as an exportable function from the SQLMaker
subclasses. It may be useful when calling ->select and ->function.
- Fixed a bug that prevented things from being deleted from the cache
storage.
- Fixed a variety of problems related to handling Postgres tables and
columns with mixed or upper case names. This included a bug that
prevented them from being reverse engineered properly. Reported by
Terrence Brannon.
- Fixed a bug when altering a Postgres column name that caused Alzabo
to generate incorrect syncing SQL.
- Make the test suite play nice with the latest Test::* modules. The
03-runtime.t tests were aborting because I feature I had been using
in earlier versions of Test::More was removed.
- Alzabo::MethodMaker will die properly if given a non-existent schema
name. Suggested by Ilya Martynov.
- If you added a sequenced primary key to a table with MySQL, Alzabo
did not generate all of the SQL necessary to change the table.
Reported by Ilya Martynov.
DEPRECATIONS:
- The Alzabo::Schema start_transaction method has been renamed to
begin_work. The finish_transaction method is now commit. The old
names are deprecated.
---------------------------------------------------------------------------
0.65 May 16, 2002
INCOMPATIBILITIES:
- Alzabo now uses the natively created Postgres sequence for SERIAL
columns. If you have existing Alzabo code with SERIAL columns that
is using the Alzabo-created sequence, then this release will break
things for you. One easy fix is to simply drop the existing
Postgres-created sequence and recreate it with a new starting number
one higher than the highest row already in existence. So if your
hightest "foo_id" value in the "Foo" table is 500, you would do
this:
DROP SEQUENCE foo_foo_id_seq;
CREATE SEQUENCE foo_foo_id_seq START 501;
- The Alzabo::Table->primary_key method is now context-sensitive,
returning a single column object in scalar context.
- The data browser is no longer installed, until such time as I can
rewrite it to be more useful.
DEPRECATIONS:
- The Alzabo::Create::Schema->add_relation method has been renamed as
Alzabo::Create::Schema->add_relationship.
ENHANCEMENTS:
- Check out the mason/widgets directory for some handy widgets that
can help integrate Mason and Alzabo in useful ways. These aren't
really well-documented yet but may be useful for playing with. More
widgets will be included in future releases (I hope).
- When creating a relationship between tables in the schema creator,
you can now let Alzabo figure out which columns to use instead of
choosing them yourself. For most relationships, Alzabo will simply
do the right thing, adding a column to one of the tables as needed.
- The problems running the tests with Postgres should now be fixed.
- Fix stupid and inefficient internal handling of "SELECT DISTINCT"
queries. Now Alzabo simply lets the database handle this, the way
it should have in the first place.
- The Alzabo::Runtime::Schema and Alzabo::Runtime::Table ->function
and ->select methods now allow you to select scalars so you can do
things like SELECT 1 FROM Foo WHERE ... in order to test for the
existence of a row.
- Added Alzabo::Table->primary_key_size method, which indicates how
many columns participate in the table's primary key.
- Added Alzabo::Runtime::Schema->row_count. Suggested by Daniel
Gaspani.
- Alzabo now detects older versions of schemas and transparently
updates them. This will work for all schemas created with version
0.55 or later.
See the section titled "Backwards Compability" in Alzabo.pm for more
details.
- Added comment attribute for tables, columns, and foreign keys.
- Add VARBIT and TIMESTAMPTZ as legal types for Postgres.
- Handle SERIAL columns in Postgres better. Use the sequence Postgres
creates for the columns rather than making our own and just insert
undef into new rows for that column.
BUG FIXES:
- Adding a column that is not-nullable or has a default to a table
under Postgres was causing an error with Postgres 7.2.1. It seems
likely that with earlier versions of Postgres, this was simply
failing silently. Patch by Daniel Gaspani.
- Fixed buggy handling of joins that had a table with a multi-column
primary key as the "distinct" parameter.
- Calling the Alzabo::Runtime::Schema->join method with no 'select'
parameter and a 'join' parameter that was an array reference of
array references would fail.
- Avoid an uninit value in Alzabo::MethodMaker. Reported by Daniel
Gaspani.
- If you created a cursor inside an eval{} block, the cursor contained
an object whose DESTROY method would overwrite $@ as it went out of
scope when the eval block exited. This could basically make it look
like an exception had disappeared. Thanks to Brad Bowman for an
excellent bug report.
- Loading a schema failed in taint mode. This was reported ages ago
by Raul Nohea Goodness and dropped on the floor by me. My bad.
- The schema creator's exception handling was a little bit buggered up
when handling Alzabo::Exception::Driver exceptions.
---------------------------------------------------------------------------
0.64 Mar 27, 2002
ENHANCEMENTS:
- Added potentially useful script, alzabo_to_ascii, in eg/ dir.
- Ask for port when setting up tests.
- Turn on stacktraces for all Alzabo::Exception objects.
- Removed the deprecated "lookup_tables" option from
Alzabo::MethodMaker.
- Removed the deprecated next_row methods from the various cursor
classes.
- Removed the deprecated Alzabo::Runtime::Table->func method.
- Major changes to how joins are done. It is now possible to mix
together various sorts of outer joins in a single query. In
addition, it is now possible to specify a foreign key that should be
used when joining two tables.
- The "tables" parameter has been renamed as "join".
- The Alzabo::Create::Schema->right_outer_join and
Alzabo::Create::Schema->left_outer_join methods have been removed.
Use the ->join method instead, which can now be used to do outer
joins as well, via:
$schema->join( join => [ left_outer_join => $foo, $bar ], ... )
- The functionality of Alzabo::Runtime::OuterJoinCursor has been
merged into Alzabo::Runtime::JoinCursor.
- Alzabo::Exception::Driver->bind now returns an array reference, not
an array.
BUG FIXES:
- Fix failure to load schema objects from file when $\ is set to
something like "\n". Reported by Brad Bowman.
- Fixed Postgres reverse engineering to work with slightly changed
system tables in 7.2.
- Fix handling of table alterations for postgres. Temp tables were
being created but not dropped and the data saved in the temp table
was not being restored to the real table. Also, Alzabo was trying
to create sequences again when altering tables Based mostly on a
patch from Daniel Gaspani.
- Fix handling of primary key changes for Postgres (I'm still not sure
it's entirely correct).
- Fix detection of primary key changes for schema diffs.
- Handle NOT IN for where conditions.
---------------------------------------------------------------------------
0.63 Feb 18, 2002
ENHANCEMENTS:
- Calling Alzabo::Runtime::Row->select or
Alzabo::Runtime::Row->select_hash with no arguments returns the
values for all of the columns in the table. Suggested by Jeremy
R. Semeiks.
- The Alzabo::Runtime::Row->id method has been renamed to id_as_string
for the benefit of those crazy people who like to use "id" as a
column name and want Alzabo::MethodMaker to be able to create such a
method. Suggested by Alexei Barantsev.
- Changed the Alzabo::Create::Schema->sync_backend method so that if
there was no corresponding schema in the RDBMS, then it will
instantiate a new schema instead of just blowing up. Similarly, the
sync_backend_sql method will just return the SQL necessary to create
the schema from scratch.
BUG FIXES:
- Removing column attributes via the schema creator was broken.
Adding them could have caused errors but generally worked.
- If you changed a column from non-sequenced to sequenced, the SQL
"diff" was not reflecting this.
- Revert a previous change to MySQL reverse engineering. Now default
for numeric columns that are not 0 or 0.00 are used instead of being
ignored. The fact that MySQL has 'default defaults' _really_ screws
things up. Bad MySQL!
- A query that ended with a subgroup could not be followed with an
order by or group by clause. Bug report and test case submitted by
Ilya Martynov.
- Nested subgroups in where clauses (like where => [ '(', '(', ....)
were not being allowed. Bug report and test case submitted by Ilya
Martynov.
- Alzabo::MethodMaker would overwrite methods in the
Alzabo::Runtime::Row/CachedRow/PotentialRow classes. This has been
fixed. Reported by Alexei Barantsev.
- Allow order by clause to contain only a SQL function to allow things
like "SELECT foo FROM Bar ORDER BY RAND()", which works with MySQL.
---------------------------------------------------------------------------
0.62 Jan 15, 2002
ENHANCEMENTS:
- Add support for IFNULL, NULLIF, and IF for MySQL.
- Document that Alzabo supports COALESCE and NULLIF for Postgres.
- Added Alzabo::ObjectCache::Sync::Mmap which uses Cache::Mmap. This
is just slightly slower than using SDBM_File.
- New table alias feature for making queries that join against a table
more than once. An example:
my $foo_alias = $foo_tab->alias;
my $cursor = $schema->join( select => $foo_tab,
tables => [ $foo_tab, $bar_tab, $foo_alias ],
where => [ [ $bar_tab->column('baz'), '=', 10 ],
[ $foo_alias->column('quux'), '=', 100 ] ],
( run in 1.440 second using v1.01-cache-2.11-cpan-99c4e6809bf )