~ubuntu-branches/ubuntu/saucy/libalzabo-perl/saucy

« back to all changes in this revision

Viewing changes to Changes

  • Committer: Bazaar Package Importer
  • Author(s): Gunnar Wolf, Martín Ferrari, Gunnar Wolf
  • Date: 2007-12-23 15:19:42 UTC
  • mfrom: (3.1.1 hardy)
  • Revision ID: james.westby@ubuntu.com-20071223151942-xvtszw722lpf47xx
Tags: 0.92-2
[ Martín Ferrari ]
* Added version mangle to avoid confusion between 2 digit and 4 digit minor
  versions. (Currently only affects qareport, because CPAN's by-dist only
  shows latest release, and ours is mimicked from the ls-lR file)

[ Gunnar Wolf ]
* Updated standards-version to 3.7.3 (No changes needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
0.92
 
2
 
 
3
BUG FIXES:
 
4
 
 
5
- Reverse engineering with MySQL broke when the tables were returned
 
6
  _without_ the schema name.
 
7
 
 
8
- Enable subselects for MySQL, though there's still no good API for
 
9
  subselects.
 
10
 
 
11
- Pass any unknown command line options through to Module::Build, for
 
12
  example things like "--install-base". Reported by Lars Dieckow. RT
 
13
  Ticket #28410.
 
14
 
 
15
- Fix a possible bug in Alzabo::Config::available_schemas. Reported by
 
16
  Otto Hirr. RT Ticket #28312
 
17
 
 
18
 
 
19
0.91  Mar 25, 2007
 
20
 
 
21
BUG FIXES:
 
22
 
 
23
- Alzabo checked whether a particular variable was an array reference
 
24
  with a construct like this "eval { @$thing } ? @$thing :
 
25
  $thing". Under most circumstances, this is ok, but Mason installs a
 
26
  $SIG{__DIE__} handler that turns all string exceptions into
 
27
  exception objects. This meant that under Mason, for any eval where
 
28
  the reference in question was _not_ an array reference, a string
 
29
  exception was caught and turned into a full-blown exception
 
30
  object. This could cause a massive performance hit in some cases.
 
31
 
 
32
 
 
33
0.90  Mar 9, 2007
 
34
 
 
35
ENHANCEMENTS:
 
36
 
 
37
- Added handling of multi-column indexes which include one function
 
38
  when reverse-engineering Pg schemas.
 
39
 
 
40
 
 
41
BUG FIXES:
 
42
 
 
43
- When a row was deleted, it was not being deleted from the cache. If
 
44
  you then inserted a row with the same primary key, you got back the
 
45
  row from the cache, which was marked as deleted, instead of the new
 
46
  row.
 
47
 
 
48
- Newer versions of MySQL may return fully qualified and quoted table
 
49
  names (`Schema`.`Table`) from $dbh->tables. This broke
 
50
  reverse-engineering.
 
51
 
 
52
- The Alzabo::Column->is_time() method was totally broken for MySQL.
 
53
 
 
54
 
 
55
0.8904  Nov 17, 2006
 
56
 
 
57
BUG FIXES:
 
58
 
 
59
- The t/21-row_by_pk-exception test blew up if no test config was
 
60
  provided, instead of just skipping its tests gracefully. Reported by
 
61
  Andy Lester.
 
62
 
 
63
 
 
64
0.8903  Nov 16, 2006
 
65
 
 
66
BUG FIXES:
 
67
 
 
68
- The change in 0.8902 to not use UNIVERSAL::isa exposed a bug in the
 
69
  handling of an attempt to load a row which doesn't exist in the
 
70
  DBMS. Reported by Jon Prettyman.
 
71
 
 
72
 
 
73
0.8902  Nov 9, 2006
 
74
 
 
75
BUG FIXES:
 
76
 
 
77
- Make Alzabo "safe" to use with UNIVERSAL::can (the module), which
 
78
  spits out lots of warning if you use Alzabo after it has been
 
79
  loaded.
 
80
 
 
81
- Fixed a warning from DBI in the 03-runtime.t tests.
 
82
 
 
83
- Fixed reverse engineering of nextval() as a column default with Pg.
 
84
 
 
85
 
 
86
0.8901  Jul 19, 2006
 
87
 
 
88
BUG FIXES:
 
89
 
 
90
- Fix reverse engineering of "now()" as default for a column with Pg.
 
91
 
 
92
 
 
93
0.89  Jun 20, 2006
 
94
 
 
95
ENHANCEMENTS:
 
96
 
 
97
- Improved schema diffs for Postgres, particularly in the area of
 
98
  comparing two columns. Now we attempt to determine if two columns
 
99
  are logically equivalent, even if they might have minor variations
 
100
  (INT vs INTEGER type name, 'f' versus 'false' for BOOLEAN default,
 
101
  etc.).
 
102
 
 
103
- Added Alzabo::SQLMaker->distinct_requires_order_by_in_select for the
 
104
  benefit of Pg, which requires that anything in the ORDER BY clause
 
105
  show up in the SELECT when you SELECT DISTINCT. This change is
 
106
  experimental, and may go away in future versions.
 
107
 
 
108
- Removed support for passing order_by and group_by as a hash
 
109
  reference. This was deprecated in 0.59.
 
110
 
 
111
BUG FIXES:
 
112
 
 
113
- When reverse engineering a Postgres schema, Alzabo did not look for
 
114
  its own sequences to determine if a column should be marked as
 
115
  sequenced.
 
116
 
 
117
- Defer FK creation until all other DDL has been executed. This
 
118
  ensures that the table to which we're referring will be available.
 
119
 
 
120
- When recreating a table during a SQL diff, make this an exception so
 
121
  we don't do other column diff/add/drop operations on the same table.
 
122
 
 
123
- Fixed a test failure in 07-methodmaker.t when testing with
 
124
  Postgres. This failure may not have showed up often because it came
 
125
  from a test that depended on the DBMS returning rows in a speific
 
126
  order by without specifying an ORDER BY.
 
127
 
 
128
- When a Postgres table is renamed, its sequences are also renamed.
 
129
 
 
130
 
 
131
0.8801  Mar 13, 2006
 
132
 
 
133
BUG FIXES:
 
134
 
 
135
- Quoting of PostgreSQL column defaults in DDL SQL was completely
 
136
  broken.
 
137
 
 
138
 
 
139
0.88  Mar 13, 2006
 
140
 
 
141
ENHANCEMENTS:
 
142
 
 
143
- Added a new option when creating a column, "default_is_raw", which
 
144
  can be used to allow for a function like NOW() as a column default.
 
145
 
 
146
- Added an "--automated" option for Build.PL, to force it to just use
 
147
  default prereqs. Also added other options to be used with this one,
 
148
  see "perl Build.PL --help" for detalis.
 
149
 
 
150
- The Alzabo::Driver classes will now transparently reconnect to the
 
151
  DBMS if you attempt to use them in a child process after a
 
152
  fork. This prevents various problems that can occur if you attempt
 
153
  to share a DBI handle between two processes. One notable problem is
 
154
  that the parent's DBI handle is closed when the child exits.
 
155
 
 
156
- Added support for (VAR)BINARY type columns in MySQL. Request by
 
157
  Martin Groenemeyer. RT Ticket #16338.
 
158
 
 
159
BUG FIXES:
 
160
 
 
161
- Alzabo::Table->foreign_keys_by_table() and foreign_keys_by_column()
 
162
  could return the same object more than once when using
 
163
  multiple-column foreign keys. Reported by Rainer Rohmfeld. RT Ticket
 
164
  #13885.
 
165
 
 
166
- Calling connect() on a driver object (via a schema object) with
 
167
  different parameters did not reconnect if the existing handle was
 
168
  still good. This was explicitly opposite what the docs said the code
 
169
  was doing. RT Ticket #17942.
 
170
 
 
171
- Fix bug in reverse engineering function indexes in Postgres.  The
 
172
  reverse engineering code always ended up thinking all of the columns
 
173
  in the table were used in the index.
 
174
 
 
175
- Fix failing MySQL test in 03-runtime.t.  The problem was the test,
 
176
  not the Alzabo core.  Reported by Alex McLintock.
 
177
 
 
178
- Fixed adding too many "=cut" directives in docs generated by
 
179
  Alzabo::MethodMaker.
 
180
 
 
181
- Fixed SQL generation for the Postgres functions CURRENT_DATE,
 
182
  CURRENT_TIME, and CURRENT_TIMESTAMP, which should not have
 
183
  parentheses after them.
 
184
 
 
185
- Documented that DATE_TRUNC() is a support Pg function in
 
186
  Alzabo::SQLMaker::PostgreSQL. RT Ticket #13843.
 
187
 
 
188
 
1
189
0.87  May 14, 2005
2
190
 
3
191
BUG FIXES:
5
193
- Table names in CREATE INDEX statements for Postgres were not quoted.
6
194
 
7
195
- Database names in CREATE/DROP DATABASE statements for Postgres were
8
 
not quoted.
 
196
  not quoted.
9
197
 
10
198
- Postgres database names with upper case characters were never being
11
 
detected as being instantiated, which meant Alzabo always tried to
12
 
recreate the schema from scratch.
 
199
  detected as being instantiated, which meant Alzabo always tried to
 
200
  recreate the schema from scratch.
13
201
 
14
202
- ALTER TABLE statements for Postgres left the table name unquoted
15
 
when renaming a column.
 
203
  when renaming a column.
16
204
 
17
205
- Even if Alzabo::Runtime::Schema->referential_integrity was false,
18
 
Alzabo was still doing referential integrity checking on inserts.
19
 
Reported by Michal Jurosz.
 
206
  Alzabo was still doing referential integrity checking on inserts.
 
207
  Reported by Michal Jurosz.
20
208
 
21
209
- 19-schema-name.t did not use the user-supplied connection parameters
22
 
and could fail because of this.  Reported by Daniel Puro.
 
210
  and could fail because of this.  Reported by Daniel Puro.
23
211
 
24
212
- Handle quotes in table names returned by Postgres when reverse
25
 
engineering.
 
213
  engineering.
26
214
 
27
215
- Reverse engineering a Postgres schema that contained indexes on
28
 
functions could fail because the Alzabo::RDBMSRules::PostgreSQL code
29
 
used a function from Text::Balanced without loading it first (or
30
 
making it a prereq for the distro).  Reported by an anonymous user via
31
 
rt.cpan.org.
 
216
  functions could fail because the Alzabo::RDBMSRules::PostgreSQL code
 
217
  used a function from Text::Balanced without loading it first (or
 
218
  making it a prereq for the distro).  Reported by an anonymous user
 
219
  via rt.cpan.org.
32
220
 
33
221
- When getting the next sequence number from a Postgres schema, Alzabo
34
 
was not quoting the sequence name even if the schema's
35
 
quote_identifiers attribute was true.  Reported by "Martin" via
36
 
rt.cpan.org.
 
222
  was not quoting the sequence name even if the schema's
 
223
  quote_identifiers attribute was true.  Reported by "Martin" via
 
224
  rt.cpan.org.
37
225
 
38
226
ENHANCEMENTS:
39
227
 
40
228
- Allow any key starting with "pg_" when connecting a Postgres
41
 
database.  This allows you to pass attributes like "pg_enable_utf8" or
42
 
"pg_bool_tf".  Prompted by a discussion with Boris Shomodjvarac.
 
229
  database.  This allows you to pass attributes like "pg_enable_utf8"
 
230
  or "pg_bool_tf".  Prompted by a discussion with Boris Shomodjvarac.
43
231
 
44
232
 
45
233
0.86  December 22, 2004
51
239
ENHANCEMENTS:
52
240
 
53
241
- It is now possible to use a single Alzabo schema object to create
54
 
and access multiple copies of that schema in an RDBMS.  This is done
55
 
by setting the "schema_name" parameter whenever calling a method that
56
 
accesses the RDBMS.
 
242
  and access multiple copies of that schema in an RDBMS.  This is done
 
243
  by setting the "schema_name" parameter whenever calling a method
 
244
  that accesses the RDBMS.
57
245
 
58
 
This feature has a bad interaction with the way internal schema diffs
59
 
are generated, however.  Please see the "MULTIPLE COPIES OF THE SAME
60
 
SCHEMA" section in Alzabo::Intro for details.
 
246
  This feature has a bad interaction with the way internal schema
 
247
  diffs are generated, however.  Please see the "MULTIPLE COPIES OF
 
248
  THE SAME SCHEMA" section in Alzabo::Intro for details.
61
249
 
62
250
- The Alzabo::Runtime::Row->update() method now returns a boolean
63
 
indicating whether any changes where actually made.  Patch by Eric
64
 
Waters.
 
251
  indicating whether any changes were actually made.  Patch by Eric
 
252
  Waters.
65
253
 
66
254
 
67
255
0.85  October 12, 2004
69
257
BUG FIXES:
70
258
 
71
259
- The DECIMAL and NUMERIC column types in MySQL were not being treated
72
 
as numeric types.  This meant that you couldn't give such a column the
73
 
UNSIGNED attribute, among other problems.  Reported by Bob Sidebotham.
 
260
  as numeric types.  This meant that you couldn't give such a column
 
261
  the UNSIGNED attribute, among other problems.  Reported by Bob
 
262
  Sidebotham.
74
263
 
75
264
- If a column had CHECK constraints, the Postgres reverse engineering
76
 
failed.  Reported by Ken Miller, fixed by Joshua Jore.
 
265
  failed.  Reported by Ken Miller, fixed by Joshua Jore.
77
266
 
78
267
- Insert handles did not include sequenced Postgres columns, causing
79
 
17-insert-handle.t to fail when run against Postgres.  Reported by
80
 
Eric Schwartz.
 
268
  17-insert-handle.t to fail when run against Postgres.  Reported by
 
269
  Eric Schwartz.
81
270
 
82
271
 
83
272
0.84  September 4, 2004
85
274
ENHANCEMENTS:
86
275
 
87
276
- Alzabo::MethodMaker will now warn you when you it creates a method
88
 
that overrides a parent class's method.  This can cause problems when
89
 
you override the table class's name() method with one that returns a
90
 
column object.
 
277
  that overrides a parent class's method.  This can cause problems
 
278
  when you override the table class's name() method with one that
 
279
  returns a column object.
91
280
 
92
281
 
93
282
BUG FIXES:
94
283
 
95
284
- Make Alzabo::Create::Schema->delete work under taint mode.  Reported
96
 
by Dana Hudes.
 
285
  by Dana Hudes.
97
286
 
98
287
- Improve Alazbo::PostgreSQL docs, specifically mentioning that if you
99
 
create a Postgres schema with mixed or upper case table names, you
100
 
need to do $schema->set_quote_identifiers(1) for any DML SQL to work.
 
288
  create a Postgres schema with mixed or upper case table names, you
 
289
  need to do $schema->set_quote_identifiers(1) for any DML SQL to
 
290
  work.
101
291
 
102
292
- The Alzabo::Runtime::Row->is_potential method didn't exist.
103
293
 
104
294
- The caching had a very nasty interaction with reverse engineering
105
 
that could cause data loss (of foreign keys) when the "sync with
106
 
backend" functionality was called from the Mason GUI.  There may have
107
 
been other bugs as well.  This was fixed by not caching reverse
108
 
engineered schemas, which is somewhat of a hack.
 
295
  that could cause data loss (of foreign keys) when the "sync with
 
296
  backend" functionality was called from the Mason GUI.  There may
 
297
  have been other bugs as well.  This was fixed by not caching reverse
 
298
  engineered schemas, which is somewhat of a hack.
109
299
 
110
 
Anyone using the Mason GUI with MySQL is encouraged to upgrade because
111
 
of this bug.
 
300
  Anyone using the Mason GUI with MySQL is encouraged to upgrade
 
301
  because of this bug.
112
302
 
113
303
 
114
304
0.83  June 9, 2004
116
306
MISCELLANEOUS:
117
307
 
118
308
- I got fed up with the instability of CVS on Sourceforge, and am now
119
 
using a Subversion repository I host myself.  See "source" page on
120
 
www.alzabo.org for details.
 
309
  using a Subversion repository I host myself.  See "source" page on
 
310
  www.alzabo.org for details.
121
311
 
122
312
 
123
313
ENHANCEMENTS:
124
314
 
125
315
- All SQL-generating methods for the Alzabo::Runtime::Schema and
126
 
Alzabo::Runtime::Table classes now accept a "quote_identifiers"
127
 
parameter, which allows you to turn this on for a single query.
 
316
  Alzabo::Runtime::Table classes now accept a "quote_identifiers"
 
317
  parameter, which allows you to turn this on for a single query.
128
318
 
129
319
- Improved handling of MySQL's "default defaults" when reverse
130
 
engineering or comparing two schemas, so that the code doesn't
131
 
generate ALTER TABLE statements that don't do anything.
 
320
  engineering or comparing two schemas, so that the code doesn't
 
321
  generate ALTER TABLE statements that don't do anything.
132
322
 
133
323
- Make many Params::Validate specs into constants, which may improve
134
 
speed a bit, and may affect memory usage under mod_perl.  This is
135
 
probably a useless micro-optimization, though.
 
324
  speed a bit, and may affect memory usage under mod_perl.  This is
 
325
  probably a useless micro-optimization, though.
136
326
 
137
327
 
138
328
BUG FIXES
139
329
 
140
330
- Make sure generated SQL for Postgres schema diffs does not include
141
 
dropping & adding the same FK constraint more than once.
 
331
  dropping & adding the same FK constraint more than once.
142
332
 
143
333
- Reverse engineering works with Postgres 7.4.  Thanks to Josh Jore
144
 
for this big patch.  Hopefully this won't break anything for Postgres
145
 
7.3 ;)
 
334
  for this big patch.  Hopefully this won't break anything for
 
335
  Postgres 7.3 ;)
146
336
 
147
337
- The Alzabo::Column->is_time_interval method was misspelled, and so
148
 
did not work at all.  Patch from Josh Jore.
 
338
  did not work at all.  Patch from Josh Jore.
149
339
 
150
340
- With Postgres 7.4, the DBI tables method always includes system
151
 
tables, so we have to filter these out in the
152
 
Alzabo::Driver::PostgreSQL->tables method.  Patch from Josh Jore.
 
341
  tables, so we have to filter these out in the
 
342
  Alzabo::Driver::PostgreSQL->tables method.  Patch from Josh Jore.
153
343
 
154
344
- Make the is_date & is_datetime method consistent across various
155
 
databases.  For Postgres, is_date was only returning true for the DATE
156
 
type, not TIMESTAMP.
 
345
  databases.  For Postgres, is_date was only returning true for the
 
346
  DATE type, not TIMESTAMP.
157
347
 
158
 
- Make is_datetime return true for Postgres' TIMESTAMPTZ column
159
 
type.
 
348
- Make is_datetime return true for Postgres' TIMESTAMPTZ column type.
160
349
 
161
350
- Turning on SQL debugging could cause Alzabo to alter bound values
162
 
that were null to the string "NULL" before performing a query.
 
351
  that were null to the string "NULL" before performing a query.
163
352
 
164
353
- If a table name was changed and an index, column, or foreign key
165
 
dropped from that table, then the generated "diff" SQL could refer to
166
 
the old table name in the various DROP statements that were generated.
 
354
  dropped from that table, then the generated "diff" SQL could refer
 
355
  to the old table name in the various DROP statements that were
 
356
  generated.
167
357
 
168
358
- Workaround a bug in MySQL that reports a "Sub_part" of 1 for
169
 
fulltext indexes.
 
359
  fulltext indexes.
170
360
 
171
361
- The changes introduced in 0.71 to track table and column renames
172
 
could cause bogus SQL to be generated if something was renamed, the
173
 
schema was instantiated, and then the schema was compared to an
174
 
existing live database which also had the same renaming done to it.
 
362
  could cause bogus SQL to be generated if something was renamed, the
 
363
  schema was instantiated, and then the schema was compared to an
 
364
  existing live database which also had the same renaming done to it.
175
365
 
176
366
- If you tried to create a relationship between two tables where one
177
 
of the tables had a varchar or char column as part of its PK, and you
178
 
let Alzabo create the foreign key column in the other table, then
179
 
Alzabo would try to set the length of the varchar/char column to
180
 
undef, which would cause an exception to be thrown.
 
367
  of the tables had a varchar or char column as part of its PK, and
 
368
  you let Alzabo create the foreign key column in the other table,
 
369
  then Alzabo would try to set the length of the varchar/char column
 
370
  to undef, which would cause an exception to be thrown.
181
371
 
182
372
---------------------------------------------------------------------------
183
373
 
186
376
ENHANCEMENTS:
187
377
 
188
378
- The Alzabo::Runtime::Table->insert() and
189
 
Alzabo::Runtime::InsertHandle->insert() methods will not create a new
190
 
row object when called in void context.  This should make inserts
191
 
faster when you don't need a row object back.
 
379
  Alzabo::Runtime::InsertHandle->insert() methods will not create a
 
380
  new row object when called in void context.  This should make
 
381
  inserts faster when you don't need a row object back.
192
382
 
193
383
- When reverse engineering a MySQL schema, Alzabo will now set a table
194
 
attribute for the table type (MyISAM, InnoDB, etc.) if the server
195
 
supports table types (which any modern version of MySQL does do).
 
384
  attribute for the table type (MyISAM, InnoDB, etc.) if the server
 
385
  supports table types (which any modern version of MySQL does do).
196
386
 
197
387
BUG FIXES:
198
388
 
199
389
- When creating the test database for MySQL, we now explicitly set the
200
 
table type to MYISAM, in case the default is something else.
201
 
Otherwise the tests will fail when we try to create a fulltext index.
 
390
  table type to MYISAM, in case the default is something else.
 
391
  Otherwise the tests will fail when we try to create a fulltext
 
392
  index.
202
393
 
203
394
KNOWN BUGS:
204
395
 
205
396
- This release will fail several tests when tested with Postgres 7.4.
206
 
Specifically, reverse engineering with Postgres 7.4 is known to be
207
 
broken.  This will be fixed in the next release.
 
397
  Specifically, reverse engineering with Postgres 7.4 is known to be
 
398
  broken.  This will be fixed in the next release.
208
399
 
209
400
---------------------------------------------------------------------------
210
401
 
213
404
ENHANCEMENTS:
214
405
 
215
406
- Added a new insert handle feature, which should be significantly
216
 
faster for batch inserts than repeatedly calling the table class's
217
 
insert() method.  Development funded by Marigold Technologies.
 
407
  faster for batch inserts than repeatedly calling the table class's
 
408
  insert() method.  Development funded by Marigold Technologies.
218
409
 
219
410
BUG FIXES:
220
411
 
221
412
- An order_by parameter that contained two SQL functions (like
222
 
"COUNT(*) DESC, AVG(score) DESC") caused the error "A sort specifier
223
 
cannot follow another sort specifier in an ORDER BY clause".
 
413
  "COUNT(*) DESC, AVG(score) DESC") caused the error "A sort specifier
 
414
  cannot follow another sort specifier in an ORDER BY clause".
224
415
 
225
416
- If you passed a no_cache parameter to a method that created a row,
226
 
this would cause an error unless Alzabo::Runtime::UniqueRowCache had
227
 
been loaded.
 
417
  this would cause an error unless Alzabo::Runtime::UniqueRowCache had
 
418
  been loaded.
228
419
 
229
420
- Workaround for bug/change/something in DBD::Pg 1.31+ that affects
230
 
the $dbh->tables method, which broke reverse engineering.
 
421
  the $dbh->tables method, which broke reverse engineering.
231
422
 
232
423
---------------------------------------------------------------------------
233
424
 
246
437
0.79_04  October 18, 2003
247
438
 
248
439
- Identical to 0.79_03 except for minor POD changes in order to try to
249
 
fix the problem of search.cpan.org treating the wrong file as the main
250
 
Alzabo.pm docs.  Again reported by Darren Duncan.
 
440
  fix the problem of search.cpan.org treating the wrong file as the
 
441
  main Alzabo.pm docs.  Again reported by Darren Duncan.
251
442
 
252
443
---------------------------------------------------------------------------
253
444
 
262
453
- Added back the no_cache parameter to avoid caching one or more rows.
263
454
 
264
455
- Moved the relevant documentation from Alzabo::Runtime::PotentialRow
265
 
into Alzabo::Runtime::Row.
 
456
  into Alzabo::Runtime::Row.
266
457
 
267
458
BUG FIXES:
268
459
 
269
460
- Fixed the NAME portion of the Alzabo::MySQL and Alzabo::PostgreSQL
270
 
POD files so that search.cpan.org doesn't think Alzabo::MySQL is the
271
 
Alzabo.pm file.  Reported by Darren Duncan.
 
461
  POD files so that search.cpan.org doesn't think Alzabo::MySQL is the
 
462
  Alzabo.pm file.  Reported by Darren Duncan.
272
463
 
273
464
- The 12-rev_engineer_pg_fk.t test would try to load DBD::Pg even if
274
 
you weren't using Postgres, which would cause the test file to die if
275
 
DBD::Pg wasn't installed.  Reported by Jost's smokehouse.
 
465
  you weren't using Postgres, which would cause the test file to die
 
466
  if DBD::Pg wasn't installed.  Reported by Jost's smokehouse.
276
467
 
277
468
- More documentation updates to remove outdated information.
278
469
 
279
470
- Split out the documentation in Alzabo.pm into Alzabo::Intro and
280
 
Alzabo::Design.
 
471
  Alzabo::Design.
281
472
 
282
473
- Added a FAQ from a question on the mailing list.  Suggested by
283
 
Terrence Brannon.
 
474
  Terrence Brannon.
284
475
 
285
476
- Eliminated a circular reference between tables created via the
286
 
Alzabo::Runtime::Table->alias() method, and the columns those alias
287
 
tables contain.  This required the use of weak references.
 
477
  Alzabo::Runtime::Table->alias() method, and the columns those alias
 
478
  tables contain.  This required the use of weak references.
288
479
 
289
 
NOTE: Alzabo regular tables and columns have circular references to
290
 
each other, but this normally isn't a problem because you generally
291
 
want to keep a whole schema around all the time anyway.
 
480
  NOTE: Alzabo regular tables and columns have circular references to
 
481
  each other, but this normally isn't a problem because you generally
 
482
  want to keep a whole schema around all the time anyway.
292
483
 
293
484
---------------------------------------------------------------------------
294
485
 
297
488
ENHANCEMENTS:
298
489
 
299
490
- Added support for table attributes like MySQL's "TYPE = ..." or
300
 
Postgres's "WITH OIDS".
 
491
  Postgres's "WITH OIDS".
301
492
 
302
493
- Added support for functional indexes in Postgres, like
303
 
"LOWER(some_col)".  Funded by Kineticode, Inc. for Bricolage 2.0.
 
494
  "LOWER(some_col)".  Funded by Kineticode, Inc. for Bricolage 2.0.
304
495
 
305
496
- Added column/table constraint/check reverse engineering for
306
 
Postgres.  Funded by Kineticode, Inc. for Bricolage 2.0.
 
497
  Postgres.  Funded by Kineticode, Inc. for Bricolage 2.0.
307
498
 
308
499
- The SQL generated for Postgres schemas now includes foreign key
309
 
constraints.
 
500
  constraints.
310
501
 
311
502
- Added a new method to Alzabo::Runtime::Schema, prefetch_none().
312
503
 
315
506
- Documented Alzabo::Runtime::UniqueRowCache.
316
507
 
317
508
- The definitions of the is_character and is_blob column methods have
318
 
been clarified.  Note that these definitions have changed from the
319
 
previous, undefined behavior.
 
509
  been clarified.  Note that these definitions have changed from the
 
510
  previous, undefined behavior.
320
511
 
321
512
- When a 1..1 or 1..n foreign key is added to a table, a unique index
322
 
is created on the columns involved in the foreign key, unless those
323
 
columns are part of the table's primary key.
 
513
  is created on the columns involved in the foreign key, unless those
 
514
  columns are part of the table's primary key.
324
515
 
325
516
BUG FIXES:
326
517
 
327
518
- Fixed a problem in the Makefile.PL which would cause it to fail even
328
 
if you had Module::Build installed.  Reported by Ken Williams.
 
519
  if you had Module::Build installed.  Reported by Ken Williams.
329
520
 
330
521
- Fixed (really, this time, I hope) a problem where the user-provided
331
 
connection parameters were not respected in the 01-driver.t tests.
332
 
Reported by Ken Williams.
 
522
  connection parameters were not respected in the 01-driver.t tests.
 
523
  Reported by Ken Williams.
333
524
 
334
525
- FK reverse engineering for Postgres sometimes got the cardinality of
335
 
the relationship wrong, making it 1..1 when it should be 1..n.  This
336
 
should be much improved in this release, though it may still have
337
 
bugs.
 
526
  the relationship wrong, making it 1..1 when it should be 1..n.  This
 
527
  should be much improved in this release, though it may still have
 
528
  bugs.
338
529
 
339
530
- Removed references to the old caching code in various spots.
340
531
 
341
532
- Fixed handling of case_sensitive parameter to
342
 
Alzabo::Column->has_attribute().
 
533
  Alzabo::Column->has_attribute().
343
534
 
344
535
BACKWARDS INCOMPATIBILITIES:
345
536
 
346
537
- When you load a runtime schema, it now calls
347
 
"$self->prefetch_all_but_blobs" in order to turn on pre-fetching by
348
 
default, since for the vast majority of users, this is a huge
349
 
performance improvement.  The new prefetch_none() method can be used
350
 
to turn off all prefetching.
 
538
  "$self->prefetch_all_but_blobs" in order to turn on pre-fetching by
 
539
  default, since for the vast majority of users, this is a huge
 
540
  performance improvement.  The new prefetch_none() method can be used
 
541
  to turn off all prefetching.
351
542
 
352
543
- The is_character column method now returns true for any text type
353
 
column, regardless of size.
 
544
  column, regardless of size.
354
545
 
355
546
- The is_blob column method now returns true only for columns that are
356
 
defined to hold binary data.
 
547
  defined to hold binary data.
357
548
 
358
549
---------------------------------------------------------------------------
359
550
 
364
555
- Distribution is now signed with Module::Signature.
365
556
 
366
557
- Lots of refactoring of the row object internals to simplify the
367
 
code.  Implemented by Ilya Martynov.
 
558
  code.  Implemented by Ilya Martynov.
368
559
 
369
560
- The testing code has been cleaned up quite a bit, and all of the
370
 
utility functions used in the tests have been consolidated in
371
 
t/lib/Alzabo/Test/Utils.pm.
 
561
  utility functions used in the tests have been consolidated in
 
562
  t/lib/Alzabo/Test/Utils.pm.
372
563
 
373
564
- Added intermediate table and row classes for MethodMaker created
374
 
classes, to provide a central point for adding new methods to table
375
 
and row objects.  Based on a patch from Ken Williams.
 
565
  classes, to provide a central point for adding new methods to table
 
566
  and row objects.  Based on a patch from Ken Williams.
376
567
 
377
568
- Support for "self-linking" tables in Alzabo::MethodMaker, a linking
378
 
table which connects a table to itself in an n..n relationship.
379
 
Implemented by Ken Williams.
 
569
  table which connects a table to itself in an n..n relationship.
 
570
  Implemented by Ken Williams.
380
571
 
381
572
- Added rdbms_version method to driver classes.  Implemented by Ken
382
 
Williams.
 
573
  Williams.
383
574
 
384
575
- Added Alzabo::Create::Schema->is_saved() method.
385
576
 
386
577
- Foreign keys are now reverse engineered for Postgres 7.3+.
387
 
Implemented by Ken Williams.
 
578
  Implemented by Ken Williams.
388
579
 
389
580
- Don't try to include dropped columns when reverse engineering
390
 
Postgres 7.3+.  Implemented by Ken Williams.
 
581
  Postgres 7.3+.  Implemented by Ken Williams.
391
582
 
392
583
- Do a better job of detecting SERIAL type columns when reverse
393
 
engineering Postgres schemas.  Based on a patch from Ken Williams.
 
584
  engineering Postgres schemas.  Based on a patch from Ken Williams.
394
585
 
395
586
- Treat Postgres data types SERIAL4, SERIAL8, BIGSERIAL, and BIGINT as
396
 
valid types.  Implemented by Josh Jore.
 
587
  valid types.  Implemented by Josh Jore.
397
588
 
398
589
- NotNullable exception now include the table and schema name.  Based
399
 
on a patch from Ken Williams.
 
590
  on a patch from Ken Williams.
400
591
 
401
592
- Primary keys are updateable.
402
593
 
403
594
- Debugging output from Alzabo::MethodMaker is clearer about what
404
 
methods are being made.  Implemented by Ken Williams.
 
595
  methods are being made.  Implemented by Ken Williams.
405
596
 
406
597
- Alzabo::MethodMaker will now create foreign key methods when two
407
 
tables have multiple relationships, as long as the name generation
408
 
callback returns different names for each of them.  Implemented by Ken
409
 
Williams.
 
598
  tables have multiple relationships, as long as the name generation
 
599
  callback returns different names for each of them.  Implemented by
 
600
  Ken Williams.
410
601
 
411
602
- A join parameter can now specify an outer join with a single array
412
 
reference, such as:
413
 
 
414
 
 [ left_outer_join => $table_A, $table_B ]
415
 
 
416
 
Previously, this could only be done as a double array reference, like:
417
 
 
418
 
 [ [ left_outer_join => $table_A, $table_B ] ]
 
603
  reference, such as:
 
604
 
 
605
    [ left_outer_join => $table_A, $table_B ]
 
606
 
 
607
  Previously, this could only be done as a double array reference, like:
 
608
 
 
609
    [ [ left_outer_join => $table_A, $table_B ] ]
419
610
 
420
611
- Various doc fixes and rewriting, most notably in Alzabo.pm.
421
612
 
422
613
BUG FIXES:
423
614
 
424
615
- A join using multiple aliases to the same table would fail with an
425
 
error message like "Cannot use column (Foo.bar_id) in select unless
426
 
its table is included in the FROM clause".
 
616
  error message like "Cannot use column (Foo.bar_id) in select unless
 
617
  its table is included in the FROM clause".
427
618
 
428
619
- Remove the long-ago deprecated next_row() and next_rows() methods.
429
620
 
430
621
- Postgres 7.3 allows identifiers to be up to 63 characters.  This
431
 
broke the code that handled sequenced columns for Postgres.  Patch by
432
 
Josh Jore.
 
622
  broke the code that handled sequenced columns for Postgres.  Patch
 
623
  by Josh Jore.
433
624
 
434
625
- If you tried to create a relationship between two tables, and the
435
 
"table_to" table already had a column of the same name as the
436
 
"column_from" column, then Alzabo died with an error.  Reported by
437
 
Ping Liang.
 
626
  "table_to" table already had a column of the same name as the
 
627
  "column_from" column, then Alzabo died with an error.  Reported by
 
628
  Ping Liang.
438
629
 
439
630
- If you had previously installed Alzabo, and then provided a new
440
 
Alzabo root directory or a new directory for the Mason components,
441
 
this was not respected during the installation process.
 
631
  Alzabo root directory or a new directory for the Mason components,
 
632
  this was not respected during the installation process.
442
633
 
443
634
- Alzabo's referential integrity checks will no longer complain if you
444
 
attempt to set a foreign key column to NULL.  Previously it would
445
 
throw an exception if the column was part of the dependent table in a
446
 
foreign key relationship.  Now, it just assumes you really meant to
447
 
allow the column to be NULLable.
 
635
  attempt to set a foreign key column to NULL.  Previously it would
 
636
  throw an exception if the column was part of the dependent table in
 
637
  a foreign key relationship.  Now, it just assumes you really meant
 
638
  to allow the column to be NULLable.
448
639
 
449
640
- The schema class's load_from_file() method now blesses the loaded
450
 
schema into the calling class.  So if you use MethodMaker to generate
451
 
classes, and then call My::Schema->load_from_file, it should always
452
 
return an object blessed into the My::Schema class.  Reported by Ken
453
 
Williams.
 
641
  schema into the calling class.  So if you use MethodMaker to
 
642
  generate classes, and then call My::Schema->load_from_file, it
 
643
  should always return an object blessed into the My::Schema class.
 
644
  Reported by Ken Williams.
454
645
 
455
646
- When checking for the MySQL variable sql_mode, the value may be
456
 
simply '' as opposed to 0.  Patch by Andrew Baumhauer.
 
647
  simply '' as opposed to 0.  Patch by Andrew Baumhauer.
457
648
 
458
649
BACKWARDS INCOMPATIBILITIES:
459
650
 
460
651
- Alzabo now requires at least Perl 5.6.0 (5.6.1+ recommended).
461
652
 
462
653
- The old caching system has been removed, as it had way too much
463
 
overhead.  There is a new, much simpler caching system provided by the
464
 
Alzabo::UniqueRowCache module.
 
654
  overhead.  There is a new, much simpler caching system provided by
 
655
  the Alzabo::UniqueRowCache module.
465
656
 
466
657
- The Alzabo::Runtime::Table->row_by_pk() method no longer dies if it
467
 
cannot find a matching row.  Instead it simply returns false.
 
658
  cannot find a matching row.  Instead it simply returns false.
468
659
 
469
660
- Some deprecated MethodMaker options were removed: insert, update,
470
 
lookup_table
 
661
  lookup_table
471
662
 
472
663
- The Alzabo::Runtime::Row->delete() method now works for potential
473
 
rows.
 
664
  rows.
474
665
 
475
666
---------------------------------------------------------------------------
476
667
 
479
670
BACKWARDS INCOMPATIBILITIES:
480
671
 
481
672
- This release no longer includes the Mason schema creation GUI.  It
482
 
can be installed separately via the Alzabo::GUI::Mason package.
 
673
  can be installed separately via the Alzabo::GUI::Mason package.
483
674
 
484
675
BUG FIXES:
485
676
 
486
677
- Fixed a bug in Alzabo::Create::Schema that only seems to be
487
 
triggered by newer Perls.  The symptom was an error like "Alzabo does
488
 
not support the 'MySQL' RDBMS" when trying to create a new schema.
 
678
  triggered by newer Perls.  The symptom was an error like "Alzabo
 
679
  does not support the 'MySQL' RDBMS" when trying to create a new
 
680
  schema.
489
681
 
490
682
- Fixed a warning in Alzabo::RDBMSRules.
491
683
 
492
684
- The 01-driver.t test ignored any user-supplied RDBMS connection
493
 
parameters.  Reported by Barry Hoggard.
 
685
  parameters.  Reported by Barry Hoggard.
494
686
 
495
687
- Newer versions of MySQL may return quoted table names, which broke
496
 
reverse engineering.
 
688
  reverse engineering.
497
689
 
498
690
- Added a quick and nasty hack to remove the schema name from table
499
 
names when reverse engineering Postgres schemas.
 
691
  names when reverse engineering Postgres schemas.
500
692
 
501
693
- Reverse engineering of indexes for MySQL 4.0+ was broken.
502
694
 
507
699
ENHANCEMENTS:
508
700
 
509
701
- Rewrote the complex build/install system to use Module::Build, which
510
 
simplified quite a bit of code.  Additionally, this should eliminate
511
 
problems reported by Win32 users with the generated Makefile, because
512
 
there is no longer a Makefile ;)
 
702
  simplified quite a bit of code.  Additionally, this should eliminate
 
703
  problems reported by Win32 users with the generated Makefile,
 
704
  because there is no longer a Makefile ;)
513
705
 
514
706
BUG FIXES:
515
707
 
516
708
- Fixed the Alzabo::MethodMaker->docs_as_pod method, which simply died
517
 
when used with a recent version of Params::Validate.  Reported by Ken
518
 
Williams.
 
709
  when used with a recent version of Params::Validate.  Reported by
 
710
  Ken Williams.
519
711
 
520
712
---------------------------------------------------------------------------
521
713
 
524
716
ENHANCEMENTS:
525
717
 
526
718
- Alzabo now tracks table and column renames after a schema has been
527
 
instantiated.  This means that when updating the schema in the
528
 
database after such a change, Alzabo can ensure that there is no data
529
 
lost because of the change.  Previously, Alzabo treated name changes
530
 
as a drop followed by an add, which caused data loss.
 
719
  instantiated.  This means that when updating the schema in the
 
720
  database after such a change, Alzabo can ensure that there is no
 
721
  data lost because of the change.  Previously, Alzabo treated name
 
722
  changes as a drop followed by an add, which caused data loss.
531
723
 
532
724
- Alzabo::DriverStatement->next_hash has been renamed next_as_hash, in
533
 
order to be consistent with the Alzabo::Runtime::Cursor classes.
 
725
  order to be consistent with the Alzabo::Runtime::Cursor classes.
534
726
 
535
727
- Experimental support for restriction clauses as part of an outer
536
 
join, such as
 
728
  join, such as
537
729
 
538
 
  SELECT ...
539
 
    FROM Foo
540
 
         LEFT OUTER JOIN Bar
541
 
            ON Foo.foo_id = Bar.foo_id
542
 
               AND Bar.something > 2
 
730
    SELECT ...
 
731
      FROM Foo
 
732
           LEFT OUTER JOIN Bar
 
733
              ON Foo.foo_id = Bar.foo_id
 
734
                 AND Bar.something > 2
543
735
 
544
736
- Added support for HAVING in queries.
545
737
 
548
740
- Exceptions did not include a stack trace.
549
741
 
550
742
- Trying to create a Postgres schema with foreign keys defined caused
551
 
an exception.  Reported by Josh Jore.
 
743
  an exception.  Reported by Josh Jore.
552
744
 
553
745
- Fetching rows from the cursor for a join with multiple outer joins
554
 
could fail if data was being prefetched.
 
746
  could fail if data was being prefetched.
555
747
 
556
748
DEPRECATIONS:
557
749
 
558
750
- Alzabo::DriverStatement->next_hash method has been renamed
559
 
next_as_hash.
 
751
  next_as_hash.
560
752
 
561
753
---------------------------------------------------------------------------
562
754
 
565
757
ENHANCEMENTS:
566
758
 
567
759
- The exception thrown when you attempt to set a non-nullable column
568
 
to NULL is now an Alzabo::Exception::NotNullable exception, instead of
569
 
an Alzabo::Exception::Params exception.  In the interests of backwards
570
 
compatibility, the former is a subclass of the latter.
 
760
  to NULL is now an Alzabo::Exception::NotNullable exception, instead
 
761
  of an Alzabo::Exception::Params exception.  In the interests of
 
762
  backwards compatibility, the former is a subclass of the latter.
571
763
 
572
764
- Improved debugging options.  See the new Alzabo::Debug module for
573
 
details.
 
765
  details.
574
766
 
575
767
BUG FIXES:
576
768
 
577
769
- Fixed Alzabo::Table->primary_key, which would die when no primary
578
 
key existed and it was called in a scalar context.  In an array
579
 
context, all the columns in the table were returned.  Reported by Eric
580
 
Prestemon.
 
770
  key existed and it was called in a scalar context.  In an array
 
771
  context, all the columns in the table were returned.  Reported by
 
772
  Eric Prestemon.
581
773
 
582
774
- Alzabo::ObjectCache::Sync::RDBMS created a table that it would later
583
 
consider incorrect.  This made this module unusable.
 
775
  consider incorrect.  This made this module unusable.
584
776
 
585
777
- Alzabo::ObjectCache::Sync::RDBMS caused weird random errors when
586
 
used with MySQL's InnoDB tables.
 
778
  used with MySQL's InnoDB tables.
587
779
 
588
780
- In the schema creator, the link to the graph page, and the link _on_
589
 
the graph page to the image, were both broken.
 
781
  the graph page to the image, were both broken.
590
782
 
591
783
- Alzabo was allowing you to rename a column to the name of an
592
 
existing column in a table.  Similarly, a table could be renamed to
593
 
the same name as an existing table.  Doing this could trash a schema.
 
784
  existing column in a table.  Similarly, a table could be renamed to
 
785
  the same name as an existing table.  Doing this could trash a
 
786
  schema.
594
787
 
595
788
- Alzabo::Runtime::Table->one_row would return undef if no row was
596
 
found, which in a list context evaluated to a true value.
 
789
  found, which in a list context evaluated to a true value.
597
790
 
598
791
- Allow no_cache option when calling Alzabo::Runtime::Schema->join.
599
792
 
600
793
- When displaying SQL, the schema creator now makes sure to
601
 
HTML-escape it, because it's possible to have HTML in there (in a
602
 
default, most likely).
 
794
  HTML-escape it, because it's possible to have HTML in there (in a
 
795
  default, most likely).
603
796
 
604
797
- The "children" method generated by Alzabo::MethodMaker did not allow
605
 
you to add additional where clause constraints to the query.
 
798
  you to add additional where clause constraints to the query.
606
799
 
607
800
---------------------------------------------------------------------------
608
801
 
615
808
BUG FIXES:
616
809
 
617
810
- ** A particularly nasty bug sometimes manifested itself when
618
 
removing a foreign key.  This bug caused the deletion of all foreign
619
 
keys involving the _corresponding_ column(s) in the foreign table.
620
 
Needless to say, this could make a big mess.
 
811
  removing a foreign key.  This bug caused the deletion of all foreign
 
812
  keys involving the _corresponding_ column(s) in the foreign table.
 
813
  Needless to say, this could make a big mess.
621
814
 
622
815
- Fix some typos in the generated docs created by Alzabo::MethodMaker.
623
816
 
624
817
- A join that included a where clause with an 'OR' generated improper
625
 
SQL.  Reported by Ilya Martynov.
 
818
  SQL.  Reported by Ilya Martynov.
626
819
 
627
820
- Calling the Alzabo::Runtime::JoinCursor->next_as_hash method when
628
 
the query involved an outer join could cause a runtime error.
 
821
  the query involved an outer join could cause a runtime error.
629
822
 
630
823
- In where clause specifications, 'and' and 'or' were only being
631
 
allowed in lower-case.  They are now allowed in any case.
 
824
  allowed in lower-case.  They are now allowed in any case.
632
825
 
633
826
- Aliases did not work in outer joins.  This has been fixed.
634
827
 
635
828
- Using outer joins was a bit fragile, in that the order of the outer
636
 
join in the context of the other joins could cause Alzabo to generate
637
 
incorrect SQL.  Now outer joins should work no matter what.
 
829
  join in the context of the other joins could cause Alzabo to
 
830
  generate incorrect SQL.  Now outer joins should work no matter what.
638
831
 
639
832
- A couple links in the schema creator had a hardcoded ".mhtml"
640
 
extension, as opposed to using the value of
641
 
Alzabo::Config::mason_extension().  Patch by Scott Lanning.
 
833
  extension, as opposed to using the value of
 
834
  Alzabo::Config::mason_extension().  Patch by Scott Lanning.
642
835
 
643
836
---------------------------------------------------------------------------
644
837
 
647
840
ENHANCEMENTS:
648
841
 
649
842
- Updated the thank you list in the README file (you too can be listed
650
 
by sending me useful bug reports, patches, suggestions, or reminding
651
 
that you already did so and I forgot ;)
 
843
  by sending me useful bug reports, patches, suggestions, or reminding
 
844
  that you already did so and I forgot ;)
652
845
 
653
846
- Allow the Driver's ->schemas method to take connection params,
654
 
wherever possible.  This allows Alzabo::Create::Schema methods like
655
 
->create, ->sync_backend_sql, and ->sync_backend to work properly when
656
 
the database server is on another machine.  Patch by Ilya Martynov.
 
847
  wherever possible.  This allows Alzabo::Create::Schema methods like
 
848
  ->create, ->sync_backend_sql, and ->sync_backend to work properly
 
849
  when the database server is on another machine.  Patch by Ilya
 
850
  Martynov.
657
851
 
658
852
- Added Alzabo::Runtime::*Row->is_live method to easily distinguish
659
 
between real and potential rows.
 
853
  between real and potential rows.
660
854
 
661
855
- Did some profiling of data retrieval (Alzabo::Runtime bits) and
662
 
optimized some of the most heavily used pieces of Alzabo.
 
856
  optimized some of the most heavily used pieces of Alzabo.
663
857
 
664
858
- Added the Alzabo::Runtime::Schema->prefetch_all and
665
 
Alzabo::Runtime::Schema->prefetch_all_but_blobs convenience methods.
 
859
  Alzabo::Runtime::Schema->prefetch_all_but_blobs convenience methods.
666
860
 
667
861
- Added a ->count method to the cursor classes.
668
862
 
670
864
->is_time, and ->generic_type methods to column objects.
671
865
 
672
866
- The Alzabo::Driver->schemas method now takes connection parameters.
673
 
See your specific driver subclass for details on which.  Bug report by
674
 
Ilya Martynov.
 
867
  See your specific driver subclass for details on which.  Bug report
 
868
  by Ilya Martynov.
675
869
 
676
870
- Added Alzabo::Runtime::Schema->disconnect method.  Patch by Ilya
677
 
Martynov.
 
871
  Martynov.
678
872
 
679
873
- Make the Makefile.PL act gracefully when it is invoked without a
680
 
tty.  Patch by Ilya Martynov.
 
874
  tty.  Patch by Ilya Martynov.
681
875
 
682
876
- The quoting of identifiers (table/column names) is now optional, and
683
 
_off_ by default.  In profiling I found that a non-trivial amount of
684
 
time was being spent quoting these, and in most cases it's not
685
 
necessary.  There is now a
686
 
Alzabo::Runtime::Schema->set_quote_identifiers method that can be used
687
 
to change this behavior.
 
877
  _off_ by default.  In profiling I found that a non-trivial amount of
 
878
  time was being spent quoting these, and in most cases it's not
 
879
  necessary.  There is now a
 
880
  Alzabo::Runtime::Schema->set_quote_identifiers method that can be
 
881
  used to change this behavior.
688
882
 
689
 
Identifiers are always quoted when using Alzabo::Create::* with
690
 
Postgres, however.
 
883
  Identifiers are always quoted when using Alzabo::Create::* with
 
884
  Postgres, however.
691
885
 
692
886
- Did a fair amount of profiling in order to optimize Alzabo's data
693
 
fetching.  In general, Alzabo::Runtime::* operations should be faster.
 
887
  fetching.  In general, Alzabo::Runtime::* operations should be
 
888
  faster.
694
889
 
695
890
- Added Alzabo::Runtime::Column->alias which is useful when executing
696
 
queries via the Alzabo::Runtime::Schema and Alzabo::Runtime::Table
697
 
->select methods.
 
891
  queries via the Alzabo::Runtime::Schema and Alzabo::Runtime::Table
 
892
  ->select methods.
698
893
 
699
894
BUG FIXES:
700
895
 
701
896
- Alzabo::MethodMake generated "lookup column/table" methods will
702
 
return if there is no matching entry in the related table, which is
703
 
important when the two tables are independent.  Previously it would
704
 
have been a runtime error (attempting to call a method on an undefined
705
 
value).
 
897
  return if there is no matching entry in the related table, which is
 
898
  important when the two tables are independent.  Previously it would
 
899
  have been a runtime error (attempting to call a method on an
 
900
  undefined value).
706
901
 
707
902
- Fix warning from Row->update.  Patch by Ilya Martynov.
708
903
 
709
904
- Alzabo::Runtime::PotentialRow's id_as_string method was misnamed id.
710
 
The docs had it wrong for all classes.
 
905
  The docs had it wrong for all classes.
711
906
 
712
907
- Catch where clauses that contain non-column/function objects as left
713
 
hand side value (like if you accidentally pass in a table object).
 
908
  hand side value (like if you accidentally pass in a table object).
714
909
 
715
910
- The Postgres TEXT column type is now considered a blob, not a
716
 
character type column.
 
911
  character type column.
717
912
 
718
913
- There was a fatal error when creating an n-to-n relationship if only
719
 
columns were given, without tables.  This was fixed with a patch from
720
 
Dan Martinez.
 
914
  columns were given, without tables.  This was fixed with a patch
 
915
  from Dan Martinez.
721
916
 
722
917
- Explicitly check for errors after calling $dbh->func.
723
918
 
724
919
- There was a bug when trying to use the schema creator to create
725
 
relationships involving more than one column.
 
920
  relationships involving more than one column.
726
921
 
727
922
- Fixed a bug where a query using the Alzabo::Runtime::Table->one_row
728
 
could cause an exception if no rows were found.
 
923
  could cause an exception if no rows were found.
729
924
 
730
925
- Alzabo::Create::Schema->sync_backend was not passing through the
731
 
connection parameters it was getting to the ->create method, causing
732
 
failures.  Patch from Ilya Martynov.
 
926
  connection parameters it was getting to the ->create method, causing
 
927
  failures.  Patch from Ilya Martynov.
733
928
 
734
929
---------------------------------------------------------------------------
735
930
 
738
933
BUG FIXES:
739
934
 
740
935
- There were some broken bits in the installation code in 0.66.  These
741
 
are now fixed.
 
936
  are now fixed.
742
937
 
743
938
---------------------------------------------------------------------------
744
939
 
747
942
ENHANCEMENTS:
748
943
 
749
944
- It is now possible to retrieve auto-generated documentation to go
750
 
along with the methods generated by Alzabo::MethodMaker.  See the
751
 
"GENERATED DOCUMENTATION" section of the Alzabo::MethodMaker docs for
752
 
more details.
 
945
  along with the methods generated by Alzabo::MethodMaker.  See the
 
946
  "GENERATED DOCUMENTATION" section of the Alzabo::MethodMaker docs
 
947
  for more details.
753
948
 
754
949
- Added documentation to all the components in mason/widgets.  You can
755
 
run perldoc on those files for more details.
 
950
  run perldoc on those files for more details.
756
951
 
757
952
- Added a very ugly hack to work around a bug with Storable 2.00 -
758
 
2.03 and a Perl < 5.8.0.
 
953
  2.03 and a Perl < 5.8.0.
759
954
 
760
955
- It is now possible to install Alzabo without defining an Alzabo root
761
 
directory.  This means you will have to set this by calling
762
 
Alzabo::Config::root_dir() every time you load Alzabo.  An attempt to
763
 
load a schema without first defining the root_dir will throw an
764
 
exception.  Based on a patch from Ilya Martynov.
 
956
  directory.  This means you will have to set this by calling
 
957
  Alzabo::Config::root_dir() every time you load Alzabo.  An attempt
 
958
  to load a schema without first defining the root_dir will throw an
 
959
  exception.  Based on a patch from Ilya Martynov.
765
960
 
766
961
BUG FIXES:
767
962
 
768
963
- Allow UNIQUE as a column attribute for Postgres.  Reported by Dan
769
 
Martinez.
 
964
  Martinez.
770
965
 
771
966
- Add DISTINCT back as an exportable function from the SQLMaker
772
 
subclasses.  It may be useful when calling ->select and ->function.
 
967
  subclasses.  It may be useful when calling ->select and ->function.
773
968
 
774
969
- Fixed a bug that prevented things from being deleted from the cache
775
 
storage.
 
970
  storage.
776
971
 
777
972
- Fixed a variety of problems related to handling Postgres tables and
778
 
columns with mixed or upper case names.  This included a bug that
779
 
prevented them from being reverse engineered properly.  Reported by
780
 
Terrence Brannon.
 
973
  columns with mixed or upper case names.  This included a bug that
 
974
  prevented them from being reverse engineered properly.  Reported by
 
975
  Terrence Brannon.
781
976
 
782
977
- Fixed a bug when altering a Postgres column name that caused Alzabo
783
 
to generate incorrect syncing SQL.
 
978
  to generate incorrect syncing SQL.
784
979
 
785
980
- Make the test suite play nice with the latest Test::* modules.  The
786
 
03-runtime.t tests were aborting because I feature I had been using in
787
 
earlier versions of Test::More was removed.
 
981
  03-runtime.t tests were aborting because I feature I had been using
 
982
  in earlier versions of Test::More was removed.
788
983
 
789
984
- Alzabo::MethodMaker will die properly if given a non-existent schema
790
 
name.  Suggested by Ilya Martynov.
 
985
  name.  Suggested by Ilya Martynov.
791
986
 
792
987
- If you added a sequenced primary key to a table with MySQL, Alzabo
793
 
did not generate all of the SQL necessary to change the table.
794
 
Reported by Ilya Martynov.
 
988
  did not generate all of the SQL necessary to change the table.
 
989
  Reported by Ilya Martynov.
795
990
 
796
991
DEPRECATIONS:
797
992
 
798
993
- The Alzabo::Schema start_transaction method has been renamed to
799
 
begin_work.  The finish_transaction method is now commit.  The old
800
 
names are deprecated.
 
994
  begin_work.  The finish_transaction method is now commit.  The old
 
995
  names are deprecated.
801
996
 
802
997
---------------------------------------------------------------------------
803
998
 
806
1001
INCOMPATIBILITIES:
807
1002
 
808
1003
- Alzabo now uses the natively created Postgres sequence for SERIAL
809
 
columns.  If you have existing Alzabo code with SERIAL columns that is
810
 
using the Alzabo-created sequence, then this release will break things
811
 
for you.  One easy fix is to simply drop the existing Postgres-created
812
 
sequence and recreate it with a new starting number one higher than
813
 
the highest row already in existence.  So if your hightest "foo_id"
814
 
value in the "Foo" table is 500, you would do this:
 
1004
  columns.  If you have existing Alzabo code with SERIAL columns that
 
1005
  is using the Alzabo-created sequence, then this release will break
 
1006
  things for you.  One easy fix is to simply drop the existing
 
1007
  Postgres-created sequence and recreate it with a new starting number
 
1008
  one higher than the highest row already in existence.  So if your
 
1009
  hightest "foo_id" value in the "Foo" table is 500, you would do
 
1010
  this:
815
1011
 
816
 
  DROP SEQUENCE foo_foo_id_seq;
817
 
  CREATE SEQUENCE foo_foo_id_seq START 501;
 
1012
    DROP SEQUENCE foo_foo_id_seq;
 
1013
    CREATE SEQUENCE foo_foo_id_seq START 501;
818
1014
 
819
1015
- The Alzabo::Table->primary_key method is now context-sensitive,
820
 
returning a single column object in scalar context.
 
1016
  returning a single column object in scalar context.
821
1017
 
822
1018
- The data browser is no longer installed, until such time as I can
823
 
rewrite it to be more useful.
 
1019
  rewrite it to be more useful.
824
1020
 
825
1021
DEPRECATIONS:
826
1022
 
827
1023
- The Alzabo::Create::Schema->add_relation method has been renamed as
828
 
Alzabo::Create::Schema->add_relationship.
 
1024
  Alzabo::Create::Schema->add_relationship.
829
1025
 
830
1026
ENHANCEMENTS:
831
1027
 
832
1028
- Check out the mason/widgets directory for some handy widgets that
833
 
can help integrate Mason and Alzabo in useful ways.  These aren't
834
 
really well-documented yet but may be useful for playing with.  More
835
 
widgets will be included in future releases (I hope).
 
1029
  can help integrate Mason and Alzabo in useful ways.  These aren't
 
1030
  really well-documented yet but may be useful for playing with.  More
 
1031
  widgets will be included in future releases (I hope).
836
1032
 
837
1033
- When creating a relationship between tables in the schema creator,
838
 
you can now let Alzabo figure out which columns to use instead of
839
 
choosing them yourself.  For most relationships, Alzabo will simply do
840
 
the right thing, adding a column to one of the tables as needed.
 
1034
  you can now let Alzabo figure out which columns to use instead of
 
1035
  choosing them yourself.  For most relationships, Alzabo will simply
 
1036
  do the right thing, adding a column to one of the tables as needed.
841
1037
 
842
1038
- The problems running the tests with Postgres should now be fixed.
843
1039
 
844
1040
- Fix stupid and inefficient internal handling of "SELECT DISTINCT"
845
 
queries.  Now Alzabo simply lets the database handle this, the way it
846
 
should have in the first place.
 
1041
  queries.  Now Alzabo simply lets the database handle this, the way
 
1042
  it should have in the first place.
847
1043
 
848
1044
- The Alzabo::Runtime::Schema and Alzabo::Runtime::Table ->function
849
 
and ->select methods now allow you to select scalars so you can do
850
 
things like SELECT 1 FROM Foo WHERE ... in order to test for the
851
 
existence of a row.
 
1045
  and ->select methods now allow you to select scalars so you can do
 
1046
  things like SELECT 1 FROM Foo WHERE ... in order to test for the
 
1047
  existence of a row.
852
1048
 
853
1049
- Added Alzabo::Table->primary_key_size method, which indicates how
854
 
many columns participate in the table's primary key.
 
1050
  many columns participate in the table's primary key.
855
1051
 
856
1052
- Added Alzabo::Runtime::Schema->row_count.  Suggested by Daniel
857
 
Gaspani.
 
1053
  Gaspani.
858
1054
 
859
1055
- Alzabo now detects older versions of schemas and transparently
860
 
updates them.  This will work for all schemas created with version
861
 
0.55 or later.
 
1056
  updates them.  This will work for all schemas created with version
 
1057
  0.55 or later.
862
1058
 
863
 
See the section titled "Backwards Compability" in Alzabo.pm for more
864
 
details.
 
1059
  See the section titled "Backwards Compability" in Alzabo.pm for more
 
1060
  details.
865
1061
 
866
1062
- Added comment attribute for tables, columns, and foreign keys.
867
1063
 
868
1064
- Add VARBIT and TIMESTAMPTZ as legal types for Postgres.
869
1065
 
870
1066
- Handle SERIAL columns in Postgres better.  Use the sequence Postgres
871
 
creates for the columns rather than making our own and just insert
872
 
undef into new rows for that column.
 
1067
  creates for the columns rather than making our own and just insert
 
1068
  undef into new rows for that column.
873
1069
 
874
1070
BUG FIXES:
875
1071
 
876
1072
- Adding a column that is not-nullable or has a default to a table
877
 
under Postgres was causing an error with Postgres 7.2.1.  It seems
878
 
likely that with earlier versions of Postgres, this was simply failing
879
 
silently.  Patch by Daniel Gaspani.
 
1073
  under Postgres was causing an error with Postgres 7.2.1.  It seems
 
1074
  likely that with earlier versions of Postgres, this was simply
 
1075
  failing silently.  Patch by Daniel Gaspani.
880
1076
 
881
1077
- Fixed buggy handling of joins that had a table with a multi-column
882
 
primary key as the "distinct" parameter.
 
1078
  primary key as the "distinct" parameter.
883
1079
 
884
1080
- Calling the Alzabo::Runtime::Schema->join method with no 'select'
885
 
parameter and a 'join' parameter that was an array reference of array
886
 
references would fail.
 
1081
  parameter and a 'join' parameter that was an array reference of
 
1082
  array references would fail.
887
1083
 
888
1084
- Avoid an uninit value in Alzabo::MethodMaker.  Reported by Daniel
889
 
Gaspani.
 
1085
  Gaspani.
890
1086
 
891
1087
- If you created a cursor inside an eval{} block, the cursor contained
892
 
an object whose DESTROY method would overwrite $@ as it went out of
893
 
scope when the eval block exited.  This could basically make it look
894
 
like an exception had disappeared.  Thanks to Brad Bowman for an
895
 
excellent bug report.
 
1088
  an object whose DESTROY method would overwrite $@ as it went out of
 
1089
  scope when the eval block exited.  This could basically make it look
 
1090
  like an exception had disappeared.  Thanks to Brad Bowman for an
 
1091
  excellent bug report.
896
1092
 
897
1093
- Loading a schema failed in taint mode.  This was reported ages ago
898
 
by Raul Nohea Goodness and dropped on the floor by me.  My bad.
 
1094
  by Raul Nohea Goodness and dropped on the floor by me.  My bad.
899
1095
 
900
 
- The schema creator's exception handling was a little bit buggered
901
 
up when handling Alzabo::Exception::Driver exceptions.
 
1096
- The schema creator's exception handling was a little bit buggered up
 
1097
  when handling Alzabo::Exception::Driver exceptions.
902
1098
 
903
1099
---------------------------------------------------------------------------
904
1100
 
913
1109
- Turn on stacktraces for all Alzabo::Exception objects.
914
1110
 
915
1111
- Removed the deprecated "lookup_tables" option from
916
 
Alzabo::MethodMaker.
 
1112
  Alzabo::MethodMaker.
917
1113
 
918
1114
- Removed the deprecated next_row methods from the various cursor
919
 
classes.
 
1115
  classes.
920
1116
 
921
1117
- Removed the deprecated Alzabo::Runtime::Table->func method.
922
1118
 
923
1119
- Major changes to how joins are done.  It is now possible to mix
924
 
together various sorts of outer joins in a single query.  In addition,
925
 
it is now possible to specify a foreign key that should be used when
926
 
joining two tables.
 
1120
  together various sorts of outer joins in a single query.  In
 
1121
  addition, it is now possible to specify a foreign key that should be
 
1122
  used when joining two tables.
927
1123
 
928
1124
- The "tables" parameter has been renamed as "join".
929
1125
 
930
1126
- The Alzabo::Create::Schema->right_outer_join and
931
 
Alzabo::Create::Schema->left_outer_join methods have been removed.
932
 
Use the ->join method instead, which can now be used to do outer joins
933
 
as well, via:
 
1127
  Alzabo::Create::Schema->left_outer_join methods have been removed.
 
1128
  Use the ->join method instead, which can now be used to do outer
 
1129
  joins as well, via:
934
1130
 
935
 
  $schema->join( join => [ left_outer_join => $foo, $bar ], ... )
 
1131
    $schema->join( join => [ left_outer_join => $foo, $bar ], ... )
936
1132
 
937
1133
- The functionality of Alzabo::Runtime::OuterJoinCursor has been
938
 
merged into Alzabo::Runtime::JoinCursor.
 
1134
  merged into Alzabo::Runtime::JoinCursor.
939
1135
 
940
1136
- Alzabo::Exception::Driver->bind now returns an array reference, not
941
 
an array.
 
1137
  an array.
942
1138
 
943
1139
BUG FIXES:
944
1140
 
945
1141
- Fix failure to load schema objects from file when $\ is set to
946
 
something like "\n".  Reported by Brad Bowman.
 
1142
  something like "\n".  Reported by Brad Bowman.
947
1143
 
948
1144
- Fixed Postgres reverse engineering to work with slightly changed
949
 
system tables in 7.2.
 
1145
  system tables in 7.2.
950
1146
 
951
1147
- Fix handling of table alterations for postgres.  Temp tables were
952
 
being created but not dropped and the data saved in the temp table was
953
 
not being restored to the real table.  Also, Alzabo was trying to
954
 
create sequences again when altering tables Based mostly on a patch
955
 
from Daniel Gaspani.
 
1148
  being created but not dropped and the data saved in the temp table
 
1149
  was not being restored to the real table.  Also, Alzabo was trying
 
1150
  to create sequences again when altering tables Based mostly on a
 
1151
  patch from Daniel Gaspani.
956
1152
 
957
1153
- Fix handling of primary key changes for Postgres (I'm still not sure
958
 
it's entirely correct).
 
1154
  it's entirely correct).
959
1155
 
960
1156
- Fix detection of primary key changes for schema diffs.
961
1157
 
968
1164
ENHANCEMENTS:
969
1165
 
970
1166
- Calling Alzabo::Runtime::Row->select or
971
 
Alzabo::Runtime::Row->select_hash with no arguments returns the values
972
 
for all of the columns in the table.  Suggested by Jeremy R. Semeiks.
 
1167
  Alzabo::Runtime::Row->select_hash with no arguments returns the
 
1168
  values for all of the columns in the table.  Suggested by Jeremy
 
1169
  R. Semeiks.
973
1170
 
974
1171
- The Alzabo::Runtime::Row->id method has been renamed to id_as_string
975
 
for the benefit of those crazy people who like to use "id" as a column
976
 
name and want Alzabo::MethodMaker to be able to create such a method.
977
 
Suggested by Alexei Barantsev.
 
1172
  for the benefit of those crazy people who like to use "id" as a
 
1173
  column name and want Alzabo::MethodMaker to be able to create such a
 
1174
  method.  Suggested by Alexei Barantsev.
978
1175
 
979
1176
- Changed the Alzabo::Create::Schema->sync_backend method so that if
980
 
there was no corresponding schema in the RDBMS, then it will
981
 
instantiate a new schema instead of just blowing up.  Similarly, the
982
 
sync_backend_sql method will just return the SQL necessary to create
983
 
the schema from scratch.
 
1177
  there was no corresponding schema in the RDBMS, then it will
 
1178
  instantiate a new schema instead of just blowing up.  Similarly, the
 
1179
  sync_backend_sql method will just return the SQL necessary to create
 
1180
  the schema from scratch.
984
1181
 
985
1182
BUG FIXES:
986
1183
 
987
1184
- Removing column attributes via the schema creator was broken.
988
 
Adding them could have caused errors but generally worked.
 
1185
  Adding them could have caused errors but generally worked.
989
1186
 
990
1187
- If you changed a column from non-sequenced to sequenced, the SQL
991
 
"diff" was not reflecting this.
 
1188
  "diff" was not reflecting this.
992
1189
 
993
1190
- Revert a previous change to MySQL reverse engineering.  Now default
994
 
for numeric columns that are not 0 or 0.00 are used instead of being
995
 
ignored.  The fact that MySQL has 'default defaults' _really_ screws
996
 
things up.  Bad MySQL!
 
1191
  for numeric columns that are not 0 or 0.00 are used instead of being
 
1192
  ignored.  The fact that MySQL has 'default defaults' _really_ screws
 
1193
  things up.  Bad MySQL!
997
1194
 
998
1195
- A query that ended with a subgroup could not be followed with an
999
 
order by or group by clause.  Bug report and test case submitted by
1000
 
Ilya Martynov.
 
1196
  order by or group by clause.  Bug report and test case submitted by
 
1197
  Ilya Martynov.
1001
1198
 
1002
1199
- Nested subgroups in where clauses (like where => [ '(', '(', ....)
1003
 
were not being allowed.  Bug report and test case submitted by Ilya
1004
 
Martynov.
 
1200
  were not being allowed.  Bug report and test case submitted by Ilya
 
1201
  Martynov.
1005
1202
 
1006
1203
- Alzabo::MethodMaker would overwrite methods in the
1007
 
Alzabo::Runtime::Row/CachedRow/PotentialRow classes.  This has been
1008
 
fixed.  Reported by Alexei Barantsev.
 
1204
  Alzabo::Runtime::Row/CachedRow/PotentialRow classes.  This has been
 
1205
  fixed.  Reported by Alexei Barantsev.
1009
1206
 
1010
1207
- Allow order by clause to contain only a SQL function to allow things
1011
 
like "SELECT foo FROM Bar ORDER BY RAND()", which works with MySQL.
 
1208
  like "SELECT foo FROM Bar ORDER BY RAND()", which works with MySQL.
1012
1209
 
1013
1210
---------------------------------------------------------------------------
1014
1211
 
1021
1218
- Document that Alzabo supports COALESCE and NULLIF for Postgres.
1022
1219
 
1023
1220
- Added Alzabo::ObjectCache::Sync::Mmap which uses Cache::Mmap.  This
1024
 
is just slightly slower than using SDBM_File.
 
1221
  is just slightly slower than using SDBM_File.
1025
1222
 
1026
1223
- New table alias feature for making queries that join against a table
1027
 
more than once.  An example:
1028
 
 
1029
 
 my $foo_alias = $foo_tab->alias;
1030
 
 
1031
 
 my $cursor = $schema->join( select => $foo_tab,
1032
 
                             tables => [ $foo_tab, $bar_tab, $foo_alias ],
1033
 
                             where  => [ [ $bar_tab->column('baz'), '=', 10 ],
1034
 
                                         [ $foo_alias->column('quux'), '=', 100 ] ],
1035
 
                             order_by => $foo_alias->column('briz') );
1036
 
 
1037
 
In this query, we want to get all the entries in the foo table based
1038
 
on a join between foo and bar with certain conditions.  However, we
1039
 
want to order the results by a _different_ criteria than that used for
1040
 
the join.  This doesn't necessarily happen often, but when it does its
1041
 
nice to be able to do it.  In SQL, this query would look something
1042
 
like this:
1043
 
 
1044
 
 SELECT foo.foo_id
1045
 
 FROM   foo, bar, foo as foo1
1046
 
 WHERE  foo.foo_id = bar.foo_id
1047
 
   AND  bar.foo_id = foo1.foo_id
1048
 
   AND  bar.baz = 10
1049
 
   AND  foo1.quux = 100
1050
 
 ORDER BY foo1.quux
 
1224
  more than once.  An example:
 
1225
 
 
1226
    my $foo_alias = $foo_tab->alias;
 
1227
 
 
1228
    my $cursor = $schema->join( select => $foo_tab,
 
1229
                                tables => [ $foo_tab, $bar_tab, $foo_alias ],
 
1230
                                where  => [ [ $bar_tab->column('baz'), '=', 10 ],
 
1231
                                            [ $foo_alias->column('quux'), '=', 100 ] ],
 
1232
                                order_by => $foo_alias->column('briz') );
 
1233
 
 
1234
  In this query, we want to get all the entries in the foo table based
 
1235
  on a join between foo and bar with certain conditions.  However, we
 
1236
  want to order the results by a _different_ criteria than that used
 
1237
  for the join.  This doesn't necessarily happen often, but when it
 
1238
  does its nice to be able to do it.  In SQL, this query would look
 
1239
  something like this:
 
1240
 
 
1241
    SELECT foo.foo_id
 
1242
    FROM   foo, bar, foo as foo1
 
1243
    WHERE  foo.foo_id = bar.foo_id
 
1244
      AND  bar.foo_id = foo1.foo_id
 
1245
      AND  bar.baz = 10
 
1246
      AND  foo1.quux = 100
 
1247
    ORDER BY foo1.quux
1051
1248
 
1052
1249
FEATURE REMOVAL:
1053
1250
 
1054
1251
- It is no longer possible to pass sorting specifications ('ASC' or
1055
 
'DESC') as part of the group_by parameter.  This was only supported by
1056
 
MySQL and it was broken in MySQL until 3.23.47 anyway.  It's weird and
1057
 
non-standard.  Just use order_by instead.
 
1252
  'DESC') as part of the group_by parameter.  This was only supported
 
1253
  by MySQL and it was broken in MySQL until 3.23.47 anyway.  It's
 
1254
  weird and non-standard.  Just use order_by instead.
1058
1255
 
1059
1256
BUG FIXES:
1060
1257
 
1061
1258
- If prefetch wasn't set, all the rows in the table were being
1062
 
pre-fetched.
 
1259
  pre-fetched.
1063
1260
 
1064
1261
- The newest Test::More (0.40) uses eval{} inside its isa_ok()
1065
 
function.  The test suite was passing $@ directly into isa_ok() and it
1066
 
would then get reset by the eval{} in the isa_ok() function.  This has
1067
 
been fixed by copying $@ into another variable before passing it into
1068
 
isa_ok().  Apparently, Test::More 0.41 will fix this as well.
 
1262
  function.  The test suite was passing $@ directly into isa_ok() and
 
1263
  it would then get reset by the eval{} in the isa_ok() function.
 
1264
  This has been fixed by copying $@ into another variable before
 
1265
  passing it into isa_ok().  Apparently, Test::More 0.41 will fix this
 
1266
  as well.
1069
1267
 
1070
1268
- Make Alzabo::ObjectCache::Store::RDBMS and
1071
 
Alzabo::ObjectCache::Sync::RDBMS play nice with Postgres.  Postgres
1072
 
aborts transactions when there are errors like an attempt to insert a
1073
 
duplicate inside a transaction.  These module would just try to insert
1074
 
potentially duplicate rows and ignore the error.  Now Postgres is
1075
 
handled specially.
 
1269
  Alzabo::ObjectCache::Sync::RDBMS play nice with Postgres.  Postgres
 
1270
  aborts transactions when there are errors like an attempt to insert
 
1271
  a duplicate inside a transaction.  These module would just try to
 
1272
  insert potentially duplicate rows and ignore the error.  Now
 
1273
  Postgres is handled specially.
1076
1274
 
1077
1275
- If you told the installer that you didn't want to run any tests with
1078
 
a live database, there would be errors when it tried to run
1079
 
03-runtime.t.  Now it just skips it.
 
1276
  a live database, there would be errors when it tried to run
 
1277
  03-runtime.t.  Now it just skips it.
1080
1278
 
1081
1279
- Alzabo includes a script called 'pod_merge.pl' that is run before
1082
 
installing its modules.  This script merges POD from a parent class
1083
 
into a child class (like from Alzabo::Table into
1084
 
Alzabo::Create::Table) in order to get all the relevant documentation
1085
 
in one place.  The way the Makefile.PL ran this script was not working
1086
 
for some people, and in addition, did not end up putting the merged
1087
 
documentation into the generated man pages.  This release includes a
1088
 
patch from Ilya Martynov that fixes both of these problems.
 
1280
  installing its modules.  This script merges POD from a parent class
 
1281
  into a child class (like from Alzabo::Table into
 
1282
  Alzabo::Create::Table) in order to get all the relevant
 
1283
  documentation in one place.  The way the Makefile.PL ran this script
 
1284
  was not working for some people, and in addition, did not end up
 
1285
  putting the merged documentation into the generated man pages.  This
 
1286
  release includes a patch from Ilya Martynov that fixes both of these
 
1287
  problems.
1089
1288
 
1090
1289
---------------------------------------------------------------------------
1091
1290
 
1094
1293
ENHANCEMENTS:
1095
1294
 
1096
1295
- Improve documentation for new Alzabo::Create::Schema->sync_backend
1097
 
method and note its caveats.
 
1296
  method and note its caveats.
1098
1297
 
1099
1298
- It is now possible to use SQL functions as part of order_by clauses.
1100
 
For example:
 
1299
  For example:
1101
1300
 
1102
 
 my $cursor = $schema->select( select => [ COUNT('*'), $id_col ],
1103
 
                               tables => [ $foo_tab, $bar_tab ],
1104
 
                               group_by => $id_col,
1105
 
                               order_by => [ COUNT('*'), 'DESC' ] );
 
1301
    my $cursor = $schema->select( select => [ COUNT('*'), $id_col ],
 
1302
                                  tables => [ $foo_tab, $bar_tab ],
 
1303
                                  group_by => $id_col,
 
1304
                                  order_by => [ COUNT('*'), 'DESC' ] );
1106
1305
 
1107
1306
- Allow a call to Alzabo::Runtime::Table->insert without a values
1108
 
parameter.  This is potentially useful for tables where the primary
1109
 
key is sequenced and the other columns have defaults or are NULLable.
1110
 
Patch by Ilya Martynov.
 
1307
  parameter.  This is potentially useful for tables where the primary
 
1308
  key is sequenced and the other columns have defaults or are
 
1309
  NULLable.  Patch by Ilya Martynov.
1111
1310
 
1112
1311
BUG FIXES:
1113
1312
 
1114
1313
- A call to the schema class's select or function methods that had
1115
 
both an order_by and group_by parameter would fail because it tried to
1116
 
process the order by clause before the group by clause.
 
1314
  both an order_by and group_by parameter would fail because it tried
 
1315
  to process the order by clause before the group by clause.
1117
1316
 
1118
1317
- When thawing potential row objects, Alzabo was trying to stick them
1119
 
into the cache, which may have worked before but not now, and should
1120
 
be avoided anyway.
 
1318
  into the cache, which may have worked before but not now, and should
 
1319
  be avoided anyway.
1121
1320
 
1122
1321
- The parent and children methods created by Alzabo::MethodMaker were
1123
 
incorrect (and unfortunately the tests of this feature were hosed
1124
 
too).
 
1322
  incorrect (and unfortunately the tests of this feature were hosed
 
1323
  too).
1125
1324
 
1126
1325
- Add YEAR as exportable function from Alzabo::SQLMaker::MySQL.
1127
1326
 
1128
1327
- Fix definition of WEEK and YEARWEEK functions exported from
1129
 
Alzabo::SQLMaker::MySQL to accept 1 or 2 parameters.
 
1328
  Alzabo::SQLMaker::MySQL to accept 1 or 2 parameters.
1130
1329
 
1131
1330
- A bug in the caching code was throwing an exception when attempting
1132
 
to update objects that weren't expired.  This only seemed to occur in
1133
 
conjuction with the prefetch functionality.  The caching code has been
1134
 
simplified a bit and is hopefully now bug-free (I can dream, can't
1135
 
I?).
 
1331
  to update objects that weren't expired.  This only seemed to occur
 
1332
  in conjuction with the prefetch functionality.  The caching code has
 
1333
  been simplified a bit and is hopefully now bug-free (I can dream,
 
1334
  can't I?).
1136
1335
 
1137
1336
- Make it possible to call Alzabo::Runtime::Schema->join with only one
1138
 
table in the tables parameter.  This is useful if you are constructing
1139
 
your join at runtime and you don't know how many tables you'll end up
1140
 
with.
 
1337
  table in the tables parameter.  This is useful if you are
 
1338
  constructing your join at runtime and you don't know how many tables
 
1339
  you'll end up with.
1141
1340
 
1142
1341
- Where clauses that began with '(' were not working.  Reported (with
1143
 
a test suite patch) by Ilya Martynov.
 
1342
  a test suite patch) by Ilya Martynov.
1144
1343
 
1145
1344
- Where clauses that contained something like ( ')', 'and' (or 'or') )
1146
 
were not working either.
 
1345
  were not working either.
1147
1346
 
1148
1347
- This file incorrectly thanked TJ Mather for separating out
1149
 
Class::Factory::Util, but this was done by Terrence Brannon.  Oops,
1150
 
brain fart.
 
1348
  Class::Factory::Util, but this was done by Terrence Brannon.  Oops,
 
1349
  brain fart.
1151
1350
 
1152
1351
- Improve the recognition of more defaults that MySQL uses for column
1153
 
lengths and defaults, in order to improve reverse engineering.
 
1352
  lengths and defaults, in order to improve reverse engineering.
1154
1353
 
1155
1354
- Recognize defaults like 0 or '' for MySQL.
1156
1355
 
1164
1363
 
1165
1364
- When passing order_by specifications, it is now possible to do this:
1166
1365
 
1167
 
  order_by => [ $col1, $col2, 'DESC', $col3, 'ASC' ]
 
1366
    order_by => [ $col1, $col2, 'DESC', $col3, 'ASC' ]
1168
1367
 
1169
 
which allow for multiple levels of sorting as well as being much
1170
 
simpler to remember.
 
1368
  which allow for multiple levels of sorting as well as being much
 
1369
  simpler to remember.
1171
1370
 
1172
1371
- It is now possible to do something like
1173
1372
 
1174
 
  $table->select( select => [ 1, $column ] ... );
 
1373
    $table->select( select => [ 1, $column ] ... );
1175
1374
 
1176
 
and have it work.  In this case, every row returned by the cursor will
1177
 
have 1 as its first element.
 
1375
  and have it work.  In this case, every row returned by the cursor
 
1376
  will have 1 as its first element.
1178
1377
 
1179
1378
- Added Alzabo::MySQL and Alzabo::PostgreSQL POD pages.  These pages
1180
 
document how Alzabo does (or does not) support various RDBMS specific
1181
 
features.
 
1379
  document how Alzabo does (or does not) support various RDBMS
 
1380
  specific features.
1182
1381
 
1183
1382
- Remove Alzabo::Util.  Use Class::Factory::Util from CPAN instead.
1184
 
Class::Factory::Util is a slight revision of Alzabo::Util that has
1185
 
been separated from the Alzabo core code by Terrence Brannon.  Thanks
1186
 
Terrence.
 
1383
  Class::Factory::Util is a slight revision of Alzabo::Util that has
 
1384
  been separated from the Alzabo core code by Terrence Brannon.
 
1385
  Thanks Terrence.
1187
1386
 
1188
1387
- Add the ability to sync the RDBMS backend to the current state of
1189
 
the Alzabo schema.  This allows you to arbitrarily update the RDBMS
1190
 
schema to match the current state of the Alzabo schema.
 
1388
  the Alzabo schema.  This allows you to arbitrarily update the RDBMS
 
1389
  schema to match the current state of the Alzabo schema.
1191
1390
 
1192
1391
- Add support for SELECT and WHERE clauses that use MySQL's fulltext
1193
 
search features.
 
1392
  search features.
1194
1393
 
1195
1394
- Add BIT and BIT VARYING as allowed types for Postgres.
1196
1395
 
1197
1396
BUG FIXES:
1198
1397
 
1199
1398
- Reverse engineering was not checking for fulltext indexes with
1200
 
MySQL.  These indexes were treated the same as other indexes.
 
1399
  MySQL.  These indexes were treated the same as other indexes.
1201
1400
 
1202
1401
- Make sure Alzabo::SQLMaker always handles stringification of
1203
 
functions properly.
 
1402
  functions properly.
1204
1403
 
1205
1404
- Improve recognition of default column lengths under MySQL (and
1206
 
ignore them).  Also improve recognition of default defaults (like
1207
 
'0000-00-00' for DATE columns) and ignore those.
 
1405
  ignore them).  Also improve recognition of default defaults (like
 
1406
  '0000-00-00' for DATE columns) and ignore those.
1208
1407
 
1209
1408
- When using the BerkeleyDB module for object syncing or storage, the
1210
 
Berkeley DB code itself creates a number of temporary files.  These
1211
 
will now be created in the same directory as the storage/syncing file
1212
 
specified.
 
1409
  Berkeley DB code itself creates a number of temporary files.  These
 
1410
  will now be created in the same directory as the storage/syncing
 
1411
  file specified.
1213
1412
 
1214
1413
- Allow GROUP BY foo ASC/DESC for MySQL.  The MySQL manual claims this
1215
 
works.  In my testing, it accepts the syntax but doesn't actually
1216
 
respect the order requested.  Of course, you can always add order by
1217
 
clause with your group by and that seems to work just fine.
 
1414
  works.  In my testing, it accepts the syntax but doesn't actually
 
1415
  respect the order requested.  Of course, you can always add order by
 
1416
  clause with your group by and that seems to work just fine.
1218
1417
 
1219
1418
- Don't allow a GROUP BY clause to follow an ORDER BY clause.  The
1220
 
reverse is still allowed.
 
1419
  reverse is still allowed.
1221
1420
 
1222
1421
- MySQL: Allow fulltext indexes to include *text type columns without
1223
 
specifying a prefix.
 
1422
  specifying a prefix.
1224
1423
 
1225
1424
- Dropping a column that had an index on it would cause an error in
1226
 
the generated SQL diff where Alzabo would drop the column and then try
1227
 
to drop (the now non-existent) index.  The fix is simply to drop the
1228
 
indexes first.
 
1425
  the generated SQL diff where Alzabo would drop the column and then
 
1426
  try to drop (the now non-existent) index.  The fix is simply to drop
 
1427
  the indexes first.
1229
1428
 
1230
1429
- Make caching code work under Perl 5.00503.
1231
1430
 
1234
1433
DEPRECATIONS:
1235
1434
 
1236
1435
- The way order_by and group_by parameters are passed has changed a
1237
 
bit.  In particular, this form:
1238
 
 
1239
 
  order_by => { columns => ..., sort => ... }
1240
 
 
1241
 
has been deprecated in favor of a simpler syntax.
 
1436
  bit.  In particular, this form:
 
1437
 
 
1438
    order_by => { columns => ..., sort => ... }
 
1439
 
 
1440
  has been deprecated in favor of a simpler syntax.
1242
1441
 
1243
1442
---------------------------------------------------------------------------
1244
1443
 
1247
1446
ENHANCEMENTS:
1248
1447
 
1249
1448
- Got rid of the post_select_hash hook and combined it with
1250
 
post_select, which now receives a hash reference.  Suggested by Ilya
1251
 
Martynov.
 
1449
  post_select, which now receives a hash reference.  Suggested by Ilya
 
1450
  Martynov.
1252
1451
 
1253
1452
- Run all hooks inside Alzabo::Schema->run_in_transaction method to
1254
 
ensure database integrity in cases where your hooks might
1255
 
update/delete/insert data.  Suggested by Ilya Martynov.
 
1453
  ensure database integrity in cases where your hooks might
 
1454
  update/delete/insert data.  Suggested by Ilya Martynov.
1256
1455
 
1257
1456
- Added new Alzabo::Runtime::Table->select method.  This is just like
1258
 
the existing ->function method, but returns a cursor instead of the
1259
 
entire result set.
 
1457
  the existing ->function method, but returns a cursor instead of the
 
1458
  entire result set.
1260
1459
 
1261
1460
- Added a 'limit' parameter to the ->function method (also works for
1262
 
the ->select method).
 
1461
  the ->select method).
1263
1462
 
1264
1463
- Added new Alzabo::Runtime::Schema->select method.  This is like the
1265
 
method of the same name in the table class but it allows for joins.
 
1464
  method of the same name in the table class but it allows for joins.
1266
1465
 
1267
1466
- Added new potential rows, which are objects with (largely) the same
1268
 
interface as regular rows, but which are not (yet) inserted into the
1269
 
database.  They are created via the new
1270
 
Alzabo::Runtime::Table->potential_row method.  Thanks to Ilya Martynov
1271
 
for suggestions and code for this feature.
 
1467
  interface as regular rows, but which are not (yet) inserted into the
 
1468
  database.  They are created via the new
 
1469
  Alzabo::Runtime::Table->potential_row method.  Thanks to Ilya
 
1470
  Martynov for suggestions and code for this feature.
1272
1471
 
1273
1472
- Added Alzabo::Runtime::Row->schema method.  Suggested by Ilya
1274
 
Martynov.
 
1473
  Martynov.
1275
1474
 
1276
1475
- Made it possible to use Storable to freeze and thaw any type of row
1277
 
object.  Previously, this would have worked but would have serialized
1278
 
basically every single Alzabo object in memory (whee!).  Patch by Ilya
1279
 
Martynov.
 
1476
  object.  Previously, this would have worked but would have
 
1477
  serialized basically every single Alzabo object in memory (whee!).
 
1478
  Patch by Ilya Martynov.
1280
1479
 
1281
1480
- Make Alzabo::Schema->run_in_transaction preserve scalar/array
1282
 
context and return whatever was returned by the wrapped code.
 
1481
  context and return whatever was returned by the wrapped code.
1283
1482
 
1284
1483
BUG FIXES:
1285
1484
 
1286
1485
- Did some review and cleanup of the exception handling code.  There
1287
 
were some places where exceptions were being handled in an unsafe
1288
 
manner as well as some spots where exception objects should have been
1289
 
thrown that were just using die.
 
1486
  were some places where exceptions were being handled in an unsafe
 
1487
  manner as well as some spots where exception objects should have
 
1488
  been thrown that were just using die.
1290
1489
 
1291
1490
- Ignore failure to rollback for MySQL when not using transactional
1292
 
table.
 
1491
  table.
1293
1492
 
1294
1493
- Alzabo was not handling the BETWEEN operator in where clauses
1295
 
properly.  Patch by Eric Hillman.
 
1494
  properly.  Patch by Eric Hillman.
1296
1495
 
1297
1496
- Passing in something like this to rows_where:
1298
1497
 
1299
 
 ( where => [ $col_foo, '=', 1,
1300
 
              $col_bar, '=', 2 ] )
 
1498
    ( where => [ $col_foo, '=', 1,
 
1499
                 $col_bar, '=', 2 ] )
1301
1500
 
1302
 
worked when it shouldn't.
 
1501
  worked when it shouldn't.
1303
1502
 
1304
1503
- Trying to do a select that involved a group by and a limit was not
1305
 
being allowed.
 
1504
  being allowed.
1306
1505
 
1307
1506
INCOMPATIBILITIES:
1308
1507
 
1309
1508
- Got rid of the post_select_hash hook and combined it with
1310
 
post_select, which now receives a hash reference.
 
1509
  post_select, which now receives a hash reference.
1311
1510
 
1312
1511
---------------------------------------------------------------------------
1313
1512
 
1316
1515
ENHANCEMENTS:
1317
1516
 
1318
1517
- Added new insert_hooks, update_hooks, select_hooks, and delete_hooks
1319
 
options to Alzabo::MethodMaker.  Suggested by Ilya Martynov.
 
1518
  options to Alzabo::MethodMaker.  Suggested by Ilya Martynov.
1320
1519
 
1321
1520
- Moved all the important document for the object caching system into
1322
 
Alzabo::ObjectCache, including the import options for all of the
1323
 
various modules.
 
1521
  Alzabo::ObjectCache, including the import options for all of the
 
1522
  various modules.
1324
1523
 
1325
1524
- Added Alzabo::ObjectCache::Sync::RDBMS &
1326
 
Alzabo::ObjectCache::Store::RDBMS.  The former finally allows
1327
 
synchronization of multiple processes across multiple machines!
 
1525
  Alzabo::ObjectCache::Store::RDBMS.  The former finally allows
 
1526
  synchronization of multiple processes across multiple machines!
1328
1527
 
1329
1528
- Add Alzabo::Schema->has_table and Alzabo::Table->has_column methods.
1330
1529
 
1331
1530
- Make BYTEA a legal column type for postgres.  This is treated as a
1332
 
blob type.
 
1531
  blob type.
1333
1532
 
1334
1533
BUG FIXES:
1335
1534
 
1336
1535
- The way cardinality and dependency was being represented in the
1337
 
schema graphs was sometimes backward and sometimes just broken.
 
1536
  schema graphs was sometimes backward and sometimes just broken.
1338
1537
 
1339
1538
- Fixed Alzabo::ObjectCache::Store::BerkeleyDB->clear, which was not
1340
 
actually doing anything.  Added tests that catch this.
 
1539
  actually doing anything.  Added tests that catch this.
1341
1540
 
1342
1541
- The lookup_tables option, which was deprecated in 0.57, was not
1343
 
being allowed at all.
 
1542
  being allowed at all.
1344
1543
 
1345
1544
- Calls to select_hash on cached rows were not going through the cache
1346
 
checking routines, possibly returning expired data.  Added tests for
1347
 
this.
 
1545
  checking routines, possibly returning expired data.  Added tests for
 
1546
  this.
1348
1547
 
1349
1548
- Eliminate race condition in Alzabo::ObjectCache::Sync::BerkeleyDB.
1350
1549
 
1351
1550
- The Alzabo::Runtime::Row->rows_by_foreign_key method wasn't doing
1352
 
quite what it said.  In cases where there was a 1..1 or n..1
1353
 
relationship to columns that were not the table's primary key, a
1354
 
cursor would be returned instead of a single row.  Reported by Ilya
1355
 
Martynov.
 
1551
  quite what it said.  In cases where there was a 1..1 or n..1
 
1552
  relationship to columns that were not the table's primary key, a
 
1553
  cursor would be returned instead of a single row.  Reported by Ilya
 
1554
  Martynov.
1356
1555
 
1357
1556
- Alzabo::MethoMaker could generate 'subroutine foo redefined'
1358
 
warnings .  Reported by Ilya Martynov.
 
1557
  warnings .  Reported by Ilya Martynov.
1359
1558
 
1360
1559
- Fixed clear method for all Alzabo::ObjectCache::Store::* modules.
1361
1560
 
1362
1561
DEPRECATIONS:
1363
1562
 
1364
1563
- The insert and update options for Alzabo::MethodMaker have been
1365
 
deprecated.  They have been replaced by the new insert_hooks and
1366
 
update_hooks options, along with new select_hooks and delete_hooks
1367
 
options.
 
1564
  deprecated.  They have been replaced by the new insert_hooks and
 
1565
  update_hooks options, along with new select_hooks and delete_hooks
 
1566
  options.
1368
1567
 
1369
1568
INCOMPATIBILITIES:
1370
1569
 
1371
 
- If you specify give the 'all' parameter to MethodMaker,
1372
 
'insert' and 'update' are no longer included.
 
1570
- If you specify give the 'all' parameter to MethodMaker, 'insert' and
 
1571
  'update' are no longer included.
1373
1572
 
1374
1573
---------------------------------------------------------------------------
1375
1574
 
1378
1577
ENHANCEMENTS:
1379
1578
 
1380
1579
- When MethodMaker creates 'row_column' methods, these are now get/set
1381
 
methods.
 
1580
  methods.
1382
1581
 
1383
1582
- Added new lookup_columns option to MethodMaker (like lookup_tables
1384
 
but more flexible).  This replaces the now deprecated lookup_tables
1385
 
option.  See DEPRECATIONS and INCOMPATIBILITIES for more details.
 
1583
  but more flexible).  This replaces the now deprecated lookup_tables
 
1584
  option.  See DEPRECATIONS and INCOMPATIBILITIES for more details.
1386
1585
 
1387
1586
- Added the ability to make any storage cache module an LRU.  Simply
1388
 
pass an lru_size parameter to Alzabo::ObjectCache when using it and
1389
 
the storage module will be an LRU cache.
 
1587
  pass an lru_size parameter to Alzabo::ObjectCache when using it and
 
1588
  the storage module will be an LRU cache.
1390
1589
 
1391
1590
- Documented Alzabo's referential integrity rules in Alzabo.pm
1392
 
(perldoc Alzabo).
 
1591
  (perldoc Alzabo).
1393
1592
 
1394
1593
- Added section on optimizing memory usage to Alzabo::FAQ.
1395
1594
 
1396
1595
- Alzabo::Runtime::Schema->join now takes a parameter called
1397
 
'distinct'.  This is useful in situations where you are joining
1398
 
between several tables but don't want rows back from all of them.  In
1399
 
that case, it is possible that you could end up getting more
1400
 
duplicates than you need.  This parameter can help you eliminate
1401
 
those.
 
1596
  'distinct'.  This is useful in situations where you are joining
 
1597
  between several tables but don't want rows back from all of them.
 
1598
  In that case, it is possible that you could end up getting more
 
1599
  duplicates than you need.  This parameter can help you eliminate
 
1600
  those.
1402
1601
 
1403
 
- Add the following Alzabo::Schema methods: begin_work,
1404
 
rollback, commit, run_in_transaction.
 
1602
- Add the following Alzabo::Schema methods: begin_work, rollback,
 
1603
  commit, run_in_transaction.
1405
1604
 
1406
1605
- If you have GraphViz installed the schema creator can now use it to
1407
 
show you a graph of your schema.
 
1606
  show you a graph of your schema.
1408
1607
 
1409
1608
BUG FIXES:
1410
1609
 
1411
1610
- Fix handling of binary attribute for MySQL columns.  Generated SQL
1412
 
for creating/altering these columns may have been invalid previously.
 
1611
  for creating/altering these columns may have been invalid
 
1612
  previously.
1413
1613
 
1414
1614
- The rules were not catching an attempt to create a CHAR/VARCHAR
1415
 
column with no length (MySQL).
 
1615
  column with no length (MySQL).
1416
1616
 
1417
1617
- Fixed bug that caused limit to not work when there was a where
1418
 
clause or order_by clause.  Reported by Ilya Martynov.
 
1618
  clause or order_by clause.  Reported by Ilya Martynov.
1419
1619
 
1420
1620
- Documented row_column option for MethodMaker.
1421
1621
 
1422
1622
- order_by was ignored when given to the Alzabo::Runtime::Schema->join
1423
 
method.  Reported by Martin Ertl.
 
1623
  method.  Reported by Martin Ertl.
1424
1624
 
1425
1625
- When viewing an existing column in the schema creator, the three
1426
 
checkboxes at the bottom were always unchecked.
 
1626
  checkboxes at the bottom were always unchecked.
1427
1627
 
1428
1628
- The test suite has been revamped to use Test::More.  In the process
1429
 
some new tests were added and some (gulp) false positives were caught.
 
1629
  some new tests were added and some (gulp) false positives were
 
1630
  caught.
1430
1631
 
1431
1632
- The default column value wasn't being escaped in the schema creator.
1432
1633
 
1433
1634
DEPRECATIONS
1434
1635
 
1435
1636
- The Alzabo::MethodMaker option 'lookup_tables' has been deprecated.
1436
 
Use the new 'lookup_columns' option instead.
 
1637
  Use the new 'lookup_columns' option instead.
1437
1638
 
1438
1639
INCOMPATIBILITIES:
1439
1640
 
1440
1641
- Alzabo::ObjectCache::Store modules now expect an object id instead
1441
 
of an object for their delete_from_cache method.
 
1642
  of an object for their delete_from_cache method.
1442
1643
 
1443
1644
- If you specify give the 'all' parameter to MethodMaker,
1444
 
'lookup_tables' is no longer included.
 
1645
  'lookup_tables' is no longer included.
1445
1646
 
1446
1647
---------------------------------------------------------------------------
1447
1648
 
1486
1687
So the steps you should take are:
1487
1688
 
1488
1689
1. Backup all of your schema files (by default, these are stored under
1489
 
/usr/local/alzabo).
 
1690
   /usr/local/alzabo).
1490
1691
 
1491
1692
2. Run convert.pl against each schema you have created by doing:
1492
1693
 
1493
 
  perl convert.pl <schema name>
 
1694
     perl convert.pl <schema name>
1494
1695
 
1495
 
This will create a file named <schema name>_schema.pl
 
1696
   This will create a file named <schema name>_schema.pl
1496
1697
 
1497
1698
3. After doing this for _all_ of your schemas, install this version
1498
 
Alzabo.
 
1699
   Alzabo.
1499
1700
 
1500
1701
4. Simply run each file created by the convert.pl script.  This will
1501
 
overwrite the old schema files.
 
1702
   overwrite the old schema files.
1502
1703
 
1503
1704
If you are creating your schemas via a script, then you can use the
1504
1705
code generated by convert.pl to replace the code that does this.  Do
1512
1713
ENHANCEMENTS:
1513
1714
 
1514
1715
- Greatly improved the flexibility of the join and *_outer_join
1515
 
methods for the schema class.  It is now possible to construct
1516
 
arbitrary joins between any set of tables in any manner.
 
1716
  methods for the schema class.  It is now possible to construct
 
1717
  arbitrary joins between any set of tables in any manner.
1517
1718
 
1518
1719
- Eliminate use of transactions where not needed and shorten their
1519
 
length in other places.  Also make sure failed commit triggers a
1520
 
rollback.
 
1720
  length in other places.  Also make sure failed commit triggers a
 
1721
  rollback.
1521
1722
 
1522
1723
- Get rid of silly min/max language in favor of cardinality and
1523
 
dependencies.
 
1724
  dependencies.
1524
1725
 
1525
1726
BUG FIXES:
1526
1727
 
1527
1728
- Fixed a problem with syncing after the Unix time rollover to 10
1528
 
digits.
 
1729
  digits.
1529
1730
 
1530
1731
- Alzabo::ForeignKey->is_many_to_one always returned false.
1531
1732
 
1532
1733
- Alzabo::MethodMaker was interpreting foreign key cardinality
1533
 
incorrectly (backwards).  This meant it was treating one-to-many
1534
 
relationships as many-to-one.  Reported by Martin Ertl.
 
1734
  incorrectly (backwards).  This meant it was treating one-to-many
 
1735
  relationships as many-to-one.  Reported by Martin Ertl.
1535
1736
 
1536
 
NOTE: This fix will break code that depended on this behavior.  See
1537
 
the UPGRADE INSTRUCTIONS above.
 
1737
  NOTE: This fix will break code that depended on this behavior.  See
 
1738
  the UPGRADE INSTRUCTIONS above.
1538
1739
 
1539
1740
- This was also broken in Alzabo::Create::Schema->add_relation.  I
1540
 
took this opportunity to rewrite the code get rid of the use of
1541
 
min_max_* and replace it with cardinality and dependency, which is
1542
 
easier to understand.
 
1741
  took this opportunity to rewrite the code get rid of the use of
 
1742
  min_max_* and replace it with cardinality and dependency, which is
 
1743
  easier to understand.
1543
1744
 
1544
 
NOTE: This fix will break old code that created schemas
1545
 
programmatically.  See the UPGRADE INSTRUCTIONS above.
 
1745
  NOTE: This fix will break old code that created schemas
 
1746
  programmatically.  See the UPGRADE INSTRUCTIONS above.
1546
1747
 
1547
1748
DEPRECATIONS:
1548
1749
 
1549
1750
- The Alzabo::Runtime::RowCursor->next_row,
1550
 
Alzabo::Runtime::JoinCursor->next_rows, and
1551
 
Alzabo::Runtime::OuterJoinCursor->next_rows methods have all been
1552
 
deprecated.  Instead, simply use the ->next method for all of them.
 
1751
  Alzabo::Runtime::JoinCursor->next_rows, and
 
1752
  Alzabo::Runtime::OuterJoinCursor->next_rows methods have all been
 
1753
  deprecated.  Instead, simply use the ->next method for all of them.
1553
1754
 
1554
1755
INCOMPATIBILITIES:
1555
1756
 
1556
1757
- The Alzabo::Column->null and Alzabo::Create::Column->set_null
1557
 
methods (deprecated in 0.20) are gone.  Use ->nullable and
1558
 
->set_nullable instead.
 
1758
  methods (deprecated in 0.20) are gone.  Use ->nullable and
 
1759
  ->set_nullable instead.
1559
1760
 
1560
1761
---------------------------------------------------------------------------
1561
1762
 
1564
1765
BUG FIXES:
1565
1766
 
1566
1767
- Accidentally broke foreign key display for schema creation interface
1567
 
in 0.50. -- In retrospect, the bug was fixing this.  Oh well, live and
1568
 
learn.
 
1768
  in 0.50. -- In retrospect, the bug was fixing this.  Oh well, live
 
1769
  and learn.
1569
1770
 
1570
1771
ENHANCEMENTS:
1571
1772
 
1572
1773
- Add ->handle method to Alzabo::Driver class, which lets you set and
1573
 
get the current database handle.  Suggested by Ilya Martynov.
 
1774
  get the current database handle.  Suggested by Ilya Martynov.
1574
1775
 
1575
1776
---------------------------------------------------------------------------
1576
1777
 
1579
1780
ENHANCEMENTS:
1580
1781
 
1581
1782
- There is now support for left and right outer joins.  The interface
1582
 
to this may change a bit in future releases.
 
1783
  to this may change a bit in future releases.
1583
1784
 
1584
1785
- Added the following methods to foreign key objects:
1585
 
from_is_dependent, to_is_dependent, is_one_to_one, is_one_to_many,
1586
 
is_many_to_one.
 
1786
  from_is_dependent, to_is_dependent, is_one_to_one, is_one_to_many,
 
1787
  is_many_to_one.
1587
1788
 
1588
1789
- Improved and fixed the Alzabo::MethodMaker documentation.
1589
1790
 
1590
1791
DEPRECATIONS:
1591
1792
 
1592
1793
- In some future release all references to the concept 'min_max_from'
1593
 
and 'min_max_to' will go away.  Instead, relationships will be
1594
 
described by their cardinality and dependencies.  This was changed in
1595
 
the schema creation interface a while ago but the APIs have not yet
1596
 
completely switched over (there are accessors for the new way, but the
1597
 
set methods still use the old concepts).  I'll make sure that there is
1598
 
a time when using these methods issues a warning about their
1599
 
deprecation.
 
1794
  and 'min_max_to' will go away.  Instead, relationships will be
 
1795
  described by their cardinality and dependencies.  This was changed
 
1796
  in the schema creation interface a while ago but the APIs have not
 
1797
  yet completely switched over (there are accessors for the new way,
 
1798
  but the set methods still use the old concepts).  I'll make sure
 
1799
  that there is a time when using these methods issues a warning about
 
1800
  their deprecation.
1600
1801
 
1601
1802
BUG FIXES:
1602
1803
 
1603
1804
- Fix pod merging, which broke a while back (this merges superclass
1604
 
documentation into subclasses for things like Alzabo::Runtime::Table).
 
1805
  documentation into subclasses for things like
 
1806
  Alzabo::Runtime::Table).
1605
1807
 
1606
1808
- The code was accidentally serializing a DBI handle, which generates
1607
 
lots of useless warnings.  This wasn't affecting Alzabo's operations
1608
 
as it never attempted to use the thawed handle.
 
1809
  lots of useless warnings.  This wasn't affecting Alzabo's operations
 
1810
  as it never attempted to use the thawed handle.
1609
1811
 
1610
1812
- Fix handling of ENUM and SET column types for MySQL.  These were not
1611
 
being allowed through properly.
 
1813
  being allowed through properly.
1612
1814
 
1613
1815
- Attempting to insert a value into a column that was related to a
1614
 
non-primary key column were not allowed if the value being inserted
1615
 
did not match the related column in the other table, even when the
1616
 
columns were not dependent on each other.  Now this is only disallowed
1617
 
when the foreign key is a primary key in its own table.
 
1816
  non-primary key column were not allowed if the value being inserted
 
1817
  did not match the related column in the other table, even when the
 
1818
  columns were not dependent on each other.  Now this is only
 
1819
  disallowed when the foreign key is a primary key in its own table.
1618
1820
 
1619
1821
---------------------------------------------------------------------------
1620
1822
 
1623
1825
BUG FIXES:
1624
1826
 
1625
1827
- Found out even more missing files from the MANIFEST (all related to
1626
 
the schema creation interface).  Fortunately, I just discovered Perl's
1627
 
"make distcheck" so this shouldn't happen in the future.
 
1828
  the schema creation interface).  Fortunately, I just discovered
 
1829
  Perl's "make distcheck" so this shouldn't happen in the future.
1628
1830
 
1629
1831
- One link each in the schema creator and data browser were using a
1630
 
hard-coded .mhtml extension instead of calling
1631
 
Alzabo::Config::mason_extension().  Reported by Barry Hoggard.
 
1832
  hard-coded .mhtml extension instead of calling
 
1833
  Alzabo::Config::mason_extension().  Reported by Barry Hoggard.
1632
1834
 
1633
1835
---------------------------------------------------------------------------
1634
1836
 
1637
1839
BUG FIXES:
1638
1840
 
1639
1841
- I was missing yet another file from the MANIFEST.  Thanks to Barry
1640
 
Hoggard for helping me out with this.
 
1842
  Hoggard for helping me out with this.
1641
1843
 
1642
1844
- Fix a bug in the test number for 03-runtime.t.
1643
1845
 
1648
1850
ENHANCEMENTS:
1649
1851
 
1650
1852
- Make several of the config values settable via the Alzabo::Config
1651
 
module.  Suggested by Jared Rhine.
 
1853
  module.  Suggested by Jared Rhine.
1652
1854
 
1653
1855
- Transactions should now work under MySQL.  Whether it does anything
1654
 
or not depends on the table type you are using.  This needs testing
1655
 
though.
 
1856
  or not depends on the table type you are using.  This needs testing
 
1857
  though.
1656
1858
 
1657
1859
BUG FIXES:
1658
1860
 
1659
1861
- Make sure that index names are not too long.
1660
1862
 
1661
1863
- Added a missing file to the MANIFEST.  0.46 was missing a needed
1662
 
file from the tarball.
 
1864
  file from the tarball.
1663
1865
 
1664
1866
---------------------------------------------------------------------------
1665
1867
 
1668
1870
ENHANCEMENTS:
1669
1871
 
1670
1872
- Column types are now canonized to be all upper case.  When multiple
1671
 
keywords specify the same type ('INT' and 'INTEGER', for example), one
1672
 
will be chosen.  This improves the quality of the reverse engineering
1673
 
and the usability of the schema creation interface.
 
1873
  keywords specify the same type ('INT' and 'INTEGER', for example),
 
1874
  one will be chosen.  This improves the quality of the reverse
 
1875
  engineering and the usability of the schema creation interface.
1674
1876
 
1675
1877
- You can now use SQL functions pretty much anywhere you would want
1676
 
(in inserts, updates, where clauses, etc).  See the "Using SQL
1677
 
Functions" section in the Alzabo.pm docs for more details.
 
1878
  (in inserts, updates, where clauses, etc).  See the "Using SQL
 
1879
  Functions" section in the Alzabo.pm docs for more details.
1678
1880
 
1679
1881
- As a corollary to the above, the Alzabo::Runtime::Table->function
1680
 
method has been created to replace the old
1681
 
Alzabo::Runtime::Table->func method.  This new method takes advantage
1682
 
of the new system for using SQL functions and is simpler and more
1683
 
flexible.  It allows you to perform all sorts of aggregate selects.
 
1882
  method has been created to replace the old
 
1883
  Alzabo::Runtime::Table->func method.  This new method takes
 
1884
  advantage of the new system for using SQL functions and is simpler
 
1885
  and more flexible.  It allows you to perform all sorts of aggregate
 
1886
  selects.
1684
1887
 
1685
1888
- Added the Alzabo::Runtime::Row->select_hash method.  Requested by
1686
 
Dana Powers.
 
1889
  Dana Powers.
1687
1890
 
1688
1891
DEPRECATIONS:
1689
1892
 
1692
1895
BUG FIXES:
1693
1896
 
1694
1897
- When adding an AUTO_INCREMENT column to an existing MySQL table, the
1695
 
SQL generated would cause an error.  This has been fixed.  However, if
1696
 
the table already has more than row then chances are this still won't
1697
 
work (because MySQL does not try to generate needed unique values for
1698
 
the column when it is added).
 
1898
  SQL generated would cause an error.  This has been fixed.  However,
 
1899
  if the table already has more than row then chances are this still
 
1900
  won't work (because MySQL does not try to generate needed unique
 
1901
  values for the column when it is added).
1699
1902
 
1700
1903
---------------------------------------------------------------------------
1701
1904
 
1704
1907
INCOMPATIBILITIES:
1705
1908
 
1706
1909
- The 'dbm_file' parameter given when loading a syncing module that
1707
 
used DBM files (such as Alzabo::ObjectCache::Sync::SDBM_File) has been
1708
 
changed to 'sync_dbm_file', because this release includes a new cache
1709
 
storage module that uses DBM files as well.
 
1910
  used DBM files (such as Alzabo::ObjectCache::Sync::SDBM_File) has
 
1911
  been changed to 'sync_dbm_file', because this release includes a new
 
1912
  cache storage module that uses DBM files as well.
1710
1913
 
1711
1914
- The schema creator now requires HTTP::BrowserDetect.
1712
1915
 
1713
1916
- Fix what was arguably a bug in the caching/syncing code.
1714
 
Previously, one process could update a row and another process could
1715
 
then update that same row.  Now the second process will throw an
1716
 
exception.
 
1917
  Previously, one process could update a row and another process could
 
1918
  then update that same row.  Now the second process will throw an
 
1919
  exception.
1717
1920
 
1718
1921
BUG FIXES:
1719
1922
 
1720
1923
- Accidentally left debugging turned on in Alzabo::Exceptions.
1721
1924
 
1722
1925
- The schema creator did not allow you to remove a length or precision
1723
 
setting for a column once it had been made.
 
1926
  setting for a column once it had been made.
1724
1927
 
1725
1928
- Require a length for CHAR and VARCHAR columns with MySQL.
1726
1929
 
1727
1930
- Add error on setting precision for any column that doesn't allow
1728
 
them with MySQL.
 
1931
  them with MySQL.
1729
1932
 
1730
1933
- The interaction of caching rows and Alzabo::MethodMaker was not
1731
 
right.  Basically, it was determined at compile time whether or not to
1732
 
use the cached row class but this needs to be determined at run time.
1733
 
This has been fixed.
 
1934
  right.  Basically, it was determined at compile time whether or not
 
1935
  to use the cached row class but this needs to be determined at run
 
1936
  time.  This has been fixed.
1734
1937
 
1735
1938
- Using the Alzabo::Runtime::Row->rows_by_foreign_key method would
1736
 
fail when the column in one table did not have the same name as a
1737
 
column in the other table.  Reported by Michael Graham (along with a
1738
 
correct diagnosis, thanks!).
 
1939
  fail when the column in one table did not have the same name as a
 
1940
  column in the other table.  Reported by Michael Graham (along with a
 
1941
  correct diagnosis, thanks!).
1739
1942
 
1740
1943
- Don't specify a database name when creating or dropping a database.
1741
 
Reported and patched by Dana Powers.
 
1944
  Reported and patched by Dana Powers.
1742
1945
 
1743
1946
ENHANCEMENTS:
1744
1947
 
1745
1948
- Rules violations error messages (bad table name, for example) in the
1746
 
schema creator are now handled in a much friendlier manner.  Instead
1747
 
of the big error dump exception page it returns you to the page you
1748
 
submitted from with an error message.
 
1949
  schema creator are now handled in a much friendlier manner.  Instead
 
1950
  of the big error dump exception page it returns you to the page you
 
1951
  submitted from with an error message.
1749
1952
 
1750
1953
- Add Alzabo::Create::Column->alter method which allows you to change
1751
 
the column type, length, and precision all at once.  This is necessary
1752
 
because some of the column type validation code will insist that a
1753
 
column have a length setting.  If you try to change them in two
1754
 
separate operations it will throw an exception.
 
1954
  the column type, length, and precision all at once.  This is
 
1955
  necessary because some of the column type validation code will
 
1956
  insist that a column have a length setting.  If you try to change
 
1957
  them in two separate operations it will throw an exception.
1755
1958
 
1756
1959
- Add Alzabo::ObjectCache::Store::Null - This allows you to use any
1757
 
multi-process syncing module without using up the memory that
1758
 
Alzabo::ObjectCache::Store::Memory uses.
 
1960
  multi-process syncing module without using up the memory that
 
1961
  Alzabo::ObjectCache::Store::Memory uses.
1759
1962
 
1760
1963
- Add Alzabo::ObjectCache::Store::BerkeleyDB - I'm not sure if storing
1761
 
in a db file is really a performance win (vs. null storage) because of
1762
 
the work needed to freeze & thaw the row objects.  Benchmarks are
1763
 
needed.
 
1964
  in a db file is really a performance win (vs. null storage) because
 
1965
  of the work needed to freeze & thaw the row objects.  Benchmarks are
 
1966
  needed.
1764
1967
 
1765
1968
- Add support for fulltext indexes (MySQL).
1766
1969
 
1767
1970
- Don't show fulltext or column prefix options when creating indexes
1768
 
for databases that don't support these features.
 
1971
  for databases that don't support these features.
1769
1972
 
1770
1973
- Use cardinality & dependency language for relations.
1771
1974
 
1772
1975
- Add some style to the schema creator (via stylesheets).  It looks a
1773
 
little better now.
 
1976
  little better now.
1774
1977
 
1775
1978
---------------------------------------------------------------------------
1776
1979
 
1779
1982
BUG FIXES:
1780
1983
 
1781
1984
- Bug fix in Alzabo::Runtime::Table->set_prefetch.  Reported by Bob
1782
 
Gustafson.
 
1985
  Gustafson.
1783
1986
 
1784
1987
- Don't try to make directories when running Makefile.PL.  Save it for
1785
 
later after user does 'make install'.
 
1988
  later after user does 'make install'.
1786
1989
 
1787
1990
- Fix handling of geometric types in Postgres (they were all being
1788
 
rejected as invalid).
 
1991
  rejected as invalid).
1789
1992
 
1790
1993
- Drop columns from a table before adding new ones.  Sometimes this
1791
 
makes a difference.  For example, if you are using MySQL and drop an
1792
 
existing AUTO_INCREMENT column and add a new one that is also
1793
 
AUTO_INCREMENT.
 
1994
  makes a difference.  For example, if you are using MySQL and drop an
 
1995
  existing AUTO_INCREMENT column and add a new one that is also
 
1996
  AUTO_INCREMENT.
1794
1997
 
1795
1998
- Only allow one sequenced column per table when using MySQL.
1796
1999
 
1797
2000
- Doc fixes.  Thanks to Ron Savage for pointing me towards some of
1798
 
these.
 
2001
  these.
1799
2002
 
1800
2003
- Fix a bug with the schema creator.  If you attempted to make a
1801
 
change to a column with an extended type and you did not change the
1802
 
type, an error occurred.
 
2004
  change to a column with an extended type and you did not change the
 
2005
  type, an error occurred.
1803
2006
 
1804
2007
ENHANCEMENTS:
1805
2008
 
1806
2009
- Schema creator now shows you a list of possible column types instead
1807
 
of having you type it in.  However, for complex types like MySQL's
1808
 
ENUM or Postgres' POLYGON there is a text box to type it in.
 
2010
  of having you type it in.  However, for complex types like MySQL's
 
2011
  ENUM or Postgres' POLYGON there is a text box to type it in.
1809
2012
 
1810
2013
---------------------------------------------------------------------------
1811
2014
 
1820
2023
BUG FIXES:
1821
2024
 
1822
2025
- Quick hack to fix a problem with Alzabo::MethodMaker when using
1823
 
caching.  However, this requires that the caching modules be loaded
1824
 
first, before Alzabo::MethodMaker.  A more palatable fix will be in a
1825
 
future release.
 
2026
  caching.  However, this requires that the caching modules be loaded
 
2027
  first, before Alzabo::MethodMaker.  A more palatable fix will be in
 
2028
  a future release.
1826
2029
 
1827
2030
- Fix a problem with prefetching rows that caused row objects to
1828
 
contain undefined values for certain columns.  This only happened if
1829
 
you were prefetching one column.
 
2031
  contain undefined values for certain columns.  This only happened if
 
2032
  you were prefetching one column.
1830
2033
 
1831
2034
- Fix another problem that left the schema creator still broken.
1832
2035
 
1847
2050
BUG FIXES:
1848
2051
 
1849
2052
- 0.40 was missing a file in the distro
1850
 
(lib/Alzabo/ObjectCache/Sync/DBM.pm).
 
2053
  (lib/Alzabo/ObjectCache/Sync/DBM.pm).
1851
2054
 
1852
2055
---------------------------------------------------------------------------
1853
2056
 
1858
2061
The classes in the ObjectCache hierarchy have been reorganized.  The
1859
2062
renaming is as follows:
1860
2063
 
1861
 
 Alzabo::ObjectCache::MemoryStore => Alzabo::ObjectCache::Store::Memory
1862
 
 Alzabo::ObjectCache::DBMSync     => Alzabo::ObjectCache::Sync::DB_File
1863
 
 Alzabo::ObjectCache::IPCSync     => Alzabo::ObjectCache::Sync::IPC.pm
1864
 
 Alzabo::ObjectCache::NullSync    => Alzabo::ObjectCache::Sync::Null.pm
 
2064
  Alzabo::ObjectCache::MemoryStore => Alzabo::ObjectCache::Store::Memory
 
2065
  Alzabo::ObjectCache::DBMSync     => Alzabo::ObjectCache::Sync::DB_File
 
2066
  Alzabo::ObjectCache::IPCSync     => Alzabo::ObjectCache::Sync::IPC.pm
 
2067
  Alzabo::ObjectCache::NullSync    => Alzabo::ObjectCache::Sync::Null.pm
1865
2068
 
1866
2069
ENHANCEMENTS:
1867
2070
 
1870
2073
- Document limit clauses for joins and single table selects.
1871
2074
 
1872
2075
- Expand options for where clauses to allow 'OR' conditionals as well
1873
 
as subgroupings of conditional clauses.
 
2076
  as subgroupings of conditional clauses.
1874
2077
 
1875
2078
- If you set prefetch columns for a table, these are now fetched along
1876
 
with other data for the table in a cursor, reducing the number of
1877
 
database SELECTs being done.
 
2079
  with other data for the table in a cursor, reducing the number of
 
2080
  database SELECTs being done.
1878
2081
 
1879
2082
- Added Alzabo::Create::Schema->clone method.  This allows you to
1880
 
clone a schema object (except for the name, which must be changed as
1881
 
part of the cloning process).
 
2083
  clone a schema object (except for the name, which must be changed as
 
2084
  part of the cloning process).
1882
2085
 
1883
2086
- Using the profiler, I have improved some of the hot spots in the
1884
 
code.  I am not sure how noticeable these improvements are but I plan
1885
 
to do a lot more of this type of work in the future.
 
2087
  code.  I am not sure how noticeable these improvements are but I
 
2088
  plan to do a lot more of this type of work in the future.
1886
2089
 
1887
2090
- Added the Alzabo::ObjectCache::Sync::BerkeleyDB and
1888
 
Alzabo::ObjectCache::Sync::SDBM_File modules.  These modules are much
1889
 
faster than the old DBMSync or IPCSync modules and actually appear to
1890
 
be faster than not syncing at all.  The NullSync (now Sync::Null)
1891
 
module is still faster than all of them, however.
 
2091
  Alzabo::ObjectCache::Sync::SDBM_File modules.  These modules are
 
2092
  much faster than the old DBMSync or IPCSync modules and actually
 
2093
  appear to be faster than not syncing at all.  The NullSync (now
 
2094
  Sync::Null) module is still faster than all of them, however.
1892
2095
 
1893
2096
BUG FIXES:
1894
2097
 
1895
2098
- Reversing engineering a MySQL schema with ENUM or SET columns may
1896
 
have caused an error if the values for the enum/set contained spaces.
 
2099
  have caused an error if the values for the enum/set contained
 
2100
  spaces.
1897
2101
 
1898
2102
- A bug in the schema creation interface made it impossible to create
1899
 
an index without a prefix.  Reported by Sam Horrocks.
 
2103
  an index without a prefix.  Reported by Sam Horrocks.
1900
2104
 
1901
2105
- When dropping a table in Postgres, the sequences for its columns (if
1902
 
any), need to be dropped as well.  Adapted from a patch submitted by
1903
 
Sam Horrocks.
 
2106
  any), need to be dropped as well.  Adapted from a patch submitted by
 
2107
  Sam Horrocks.
1904
2108
 
1905
2109
- The modules needed by the schema creator and data browser are now
1906
 
used by the components.  However, it is still better to load them at
1907
 
server startup in order to maximize shared memory.
 
2110
  used by the components.  However, it is still better to load them at
 
2111
  server startup in order to maximize shared memory.
1908
2112
 
1909
2113
- Calling the object cache's clear method did not work when using the
1910
 
IPCSync or NullSync modules.
 
2114
  IPCSync or NullSync modules.
1911
2115
 
1912
2116
- Reverse engineering a Postgres database was choking on char(n)
1913
 
columns, which are converted internally by Postgres into bpchar(n)
1914
 
columns.  This is now fixed (by converting them back during reverse
1915
 
engineering).
 
2117
  columns, which are converted internally by Postgres into bpchar(n)
 
2118
  columns.  This is now fixed (by converting them back during reverse
 
2119
  engineering).
1916
2120
 
1917
2121
- Reject column prefixes > 255 with MySQL.  I hesitate to call this a
1918
 
bug fix since this appears to be undocumented in the MySQL docs.
 
2122
  bug fix since this appears to be undocumented in the MySQL docs.
1919
2123
 
1920
2124
- Using the DBMSync module in an environment which started as one user
1921
 
and then became another (like Apache) may have caused permiission
1922
 
problems with the dbm file.  This has been fixed.
 
2125
  and then became another (like Apache) may have caused permiission
 
2126
  problems with the dbm file.  This has been fixed.
1923
2127
 
1924
2128
MISC:
1925
2129
 
1926
2130
- Require DBD::Pg 0.97 (the latest version as of this writing) as it
1927
 
fixes some bugs in earlier versions.
 
2131
  fixes some bugs in earlier versions.
1928
2132
 
1929
2133
ARCHITECTURE:
1930
2134
 
1931
2135
- Split up Row object into Alzabo::Runtime::Row (base class for
1932
 
standard uncached row) and Alzabo::Runtime::CachedRow (subclass for
1933
 
rows that have to interact with a cache).  This simplifies the code,
1934
 
particulary in terms of how it interacts with the caching system.
 
2136
  standard uncached row) and Alzabo::Runtime::CachedRow (subclass for
 
2137
  rows that have to interact with a cache).  This simplifies the code,
 
2138
  particulary in terms of how it interacts with the caching system.
1935
2139
 
1936
2140
- Made Alzabo::Runtime::Row->get_data a private method.  This served
1937
 
no purpose for end users anyway.
 
2141
  no purpose for end users anyway.
1938
2142
 
1939
2143
---------------------------------------------------------------------------
1940
2144
 
1942
2146
 
1943
2147
- Addition of Params::Validate broke several methods:
1944
2148
-- The Alzabo::Schema->tables method was broken when trying to
1945
 
retrieve a subset of all the tables.
 
2149
   retrieve a subset of all the tables.
1946
2150
-- The Alzabo::Create::Schema->move_table method was broken (thus
1947
 
breaking the ability to add a table at a specified place in the table
1948
 
order).
 
2151
   breaking the ability to add a table at a specified place in the table
 
2152
   order).
1949
2153
-- Same problem for Alzabo::Create::Table->move_column.
1950
2154
 
1951
2155
- Added to the test suite to catch all this in the future.
1952
2156
 
1953
2157
- Attempting to dynamically generate component paths in the Mason
1954
 
component was a bad idea, particularly since it was unnecessary
1955
 
because I can find the component by doing '../common/foo'.  Thanks to
1956
 
Bob Gustafson for suggesting this.
 
2158
  component was a bad idea, particularly since it was unnecessary
 
2159
  because I can find the component by doing '../common/foo'.  Thanks
 
2160
  to Bob Gustafson for suggesting this.
1957
2161
 
1958
2162
- Fix bug in Postgres rules that didn't allow length for CHAR columns.
1959
2163
 
1964
2168
0.35 Mar 18, 2001
1965
2169
 
1966
2170
- Add ability to specify port parameter when connecting to DB for
1967
 
reverse engineering/data browser.
 
2171
  reverse engineering/data browser.
1968
2172
 
1969
2173
- Fix support for host param in data browser.
1970
2174
 
1971
2175
- Added a new Alzabo/FAQ.pod file.  Its pretty skimpy but hopefully it
1972
 
will become more useful over time.
 
2176
  will become more useful over time.
1973
2177
 
1974
2178
- If your Mason component root was under your document then the links
1975
 
to return to the top levels of the schema creator and data browser
1976
 
were broken.  Note: if your component root is entirely outside your
1977
 
document root then things may not work at all.
 
2179
  to return to the top levels of the schema creator and data browser
 
2180
  were broken.  Note: if your component root is entirely outside your
 
2181
  document root then things may not work at all.
1978
2182
 
1979
2183
- Add support for extra MySQL connection params (like
1980
 
mysql_default_file).  See the Alzabo::Driver::MySQL docs for more
1981
 
details.
 
2184
  mysql_default_file).  See the Alzabo::Driver::MySQL docs for more
 
2185
  details.
1982
2186
 
1983
2187
- Add support for Postgres connect params 'options' and 'tty'.
1984
2188
 
1985
2189
- Alzabo::Create::Schema->reverse_engineer was not passing the 'port'
1986
 
parameter to the driver when attempting to make a driver.
 
2190
  parameter to the driver when attempting to make a driver.
1987
2191
 
1988
2192
- Attempting to pass in the port parameter to a connection would have
1989
 
generated a bad DSN due to a type in the code.
 
2193
  generated a bad DSN due to a type in the code.
1990
2194
 
1991
2195
- Started using Params::Validate so I can be even stricter about
1992
 
argument checking.
 
2196
  argument checking.
1993
2197
 
1994
2198
- Fix bug introduced in 0.33.  Changing a column's type always removed
1995
 
any length and precision setting for the column.  Now it is only
1996
 
removed if the new column type does not allow a length or precision
1997
 
setting.
 
2199
  any length and precision setting for the column.  Now it is only
 
2200
  removed if the new column type does not allow a length or precision
 
2201
  setting.
1998
2202
 
1999
2203
- Fix some warnings in the Makefile.PL code.  Also require Pod::Man >=
2000
 
1.14 to handle =head3 and =head4 directives.
 
2204
  1.14 to handle =head3 and =head4 directives.
2001
2205
 
2002
2206
- The Postgres code did not allow the ABSTIME, MACADDR, or RELTIME
2003
 
column types.  These have been added.  Thanks to Bob Gustafson for
2004
 
helping me find this problem.
 
2207
  column types.  These have been added.  Thanks to Bob Gustafson for
 
2208
  helping me find this problem.
2005
2209
 
2006
2210
- The Alzabo::Create::Schema->reverse_engineer method was not doing
2007
 
anything with a host parameter.  Reported by Aaron Johnson.
 
2211
  anything with a host parameter.  Reported by Aaron Johnson.
2008
2212
 
2009
2213
- Fix bug in Alzabo::ObjectCache docs.  Reported by Robin Berjon.
2010
2214
 
2011
2215
- Include a first version of the quick method reference suggested by
2012
 
Robin Berjon.  This Alzabo::QuickRef.  The HTML version is table-ized
2013
 
and spiffed up a bit from the POD version.
 
2216
  Robin Berjon.  This Alzabo::QuickRef.  The HTML version is
 
2217
  table-ized and spiffed up a bit from the POD version.
2014
2218
 
2015
2219
---------------------------------------------------------------------------
2016
2220
 
2017
2221
0.34 Feb 26, 2001
2018
2222
 
2019
2223
- If you were trying to run the tests on a system without MySQL
2020
 
installed, or without the DB_File or IPC::Shareable modules, you saw
2021
 
lots of test failures, even if you said you did not plan to use the
2022
 
parts of Alzabo that required these.  This has been fixed.  I can now
2023
 
run the tests successfully using a Perl with only DBD::Pg and DBI
2024
 
installed and it will skip any tests that it can't run.
 
2224
  installed, or without the DB_File or IPC::Shareable modules, you saw
 
2225
  lots of test failures, even if you said you did not plan to use the
 
2226
  parts of Alzabo that required these.  This has been fixed.  I can
 
2227
  now run the tests successfully using a Perl with only DBD::Pg and
 
2228
  DBI installed and it will skip any tests that it can't run.
2025
2229
 
2026
2230
- Fixed another caching bug related to objects that were deleted and
2027
 
then another row was inserted with the same primary key.  Note to
2028
 
self: premature optimization is the root of all evil.
 
2231
  then another row was inserted with the same primary key.  Note to
 
2232
  self: premature optimization is the root of all evil.
2029
2233
 
2030
2234
---------------------------------------------------------------------------
2031
2235
 
2032
2236
0.33 Feb 21, 2001
2033
2237
 
2034
2238
- The linking table methods generated by Alzabo::MethodMaker were
2035
 
broken.  Fixed this.
 
2239
  broken.  Fixed this.
2036
2240
 
2037
2241
- Changed how order by clauses can be passed to select operations.
2038
 
Also changed the docs, which were way out of sync with the changes in
2039
 
this area.
 
2242
  Also changed the docs, which were way out of sync with the changes
 
2243
  in this area.
2040
2244
 
2041
2245
- Attempting to update more than one value at once was broken.  Fixed
2042
 
this.
 
2246
  this.
2043
2247
 
2044
2248
- Added Alzabo::Runtime::Table->func method to allow arbitrary column
2045
 
aggregate functions like MAX, MIN, AVG, etc.
 
2249
  aggregate functions like MAX, MIN, AVG, etc.
2046
2250
 
2047
2251
- Fixed schema creator bug.  It was not possible to change a column's
2048
 
NULLability after it was created.
 
2252
  NULLability after it was created.
2049
2253
 
2050
2254
- When changing a column's type, Alzabo now removes any column
2051
 
attributes that are not valid for that column.  In addition, if the
2052
 
existing length and precision parameters are not valid, they will be
2053
 
set to undef.
 
2255
  attributes that are not valid for that column.  In addition, if the
 
2256
  existing length and precision parameters are not valid, they will be
 
2257
  set to undef.
2054
2258
 
2055
2259
- Fixed the code to get rid of weird error messages that came from DBI
2056
 
with Perl 5.6.0+ when the Alzabo::Create::Schema->create or
2057
 
Alzabo::Create::Schema->reverse_engineer methods were called.  For the
2058
 
curious, this has to do with the DBI object passing through
2059
 
Storable::dclone.
 
2260
  with Perl 5.6.0+ when the Alzabo::Create::Schema->create or
 
2261
  Alzabo::Create::Schema->reverse_engineer methods were called.  For
 
2262
  the curious, this has to do with the DBI object passing through
 
2263
  Storable::dclone.
2060
2264
 
2061
2265
---------------------------------------------------------------------------
2062
2266
 
2063
2267
0.32 Feb 7, 2001
2064
2268
 
2065
2269
- Forgot to include data browser files in MANIFEST.  Caused weirdness
2066
 
if you said you wanted it when asked during install.  Reported by Remi
2067
 
Cohen-Scali.
 
2270
  if you said you wanted it when asked during install.  Reported by
 
2271
  Remi Cohen-Scali.
2068
2272
 
2069
2273
---------------------------------------------------------------------------
2070
2274
 
2073
2277
Bug fixes only
2074
2278
 
2075
2279
- Fix bugs in Alzabo::MethodMaker.  The insert, update, lookup_table,
2076
 
and self_relation (parent portion only) were broken.
 
2280
  and self_relation (parent portion only) were broken.
2077
2281
 
2078
2282
- A bug in the SQL making code was causing some queries to appear as
2079
 
if they failed when they didn't.
 
2283
  if they failed when they didn't.
2080
2284
 
2081
2285
---------------------------------------------------------------------------
2082
2286
 
2083
2287
0.30 Feb 4, 2001
2084
2288
 
2085
2289
- The convert.pl script in eg/ has been updated to handle the new
2086
 
release.  IMPORTANT: I forgot to include a mention of this in the last
2087
 
release but you need to run the script _before_ installing a new
2088
 
version of Alzabo.
 
2290
  release.  IMPORTANT: I forgot to include a mention of this in the
 
2291
  last release but you need to run the script _before_ installing a
 
2292
  new version of Alzabo.
2089
2293
 
2090
2294
- Many improvements and updates to Alzabo::MethodMaker.  Highlights
2091
 
include fixing a bug that prevented the insert and update methods from
2092
 
being created, a new callback system that allows you to specify all
2093
 
the method names to be generated, and a new 'self_relations' option
2094
 
for tables that have parent/child relationships with themself.
 
2295
  include fixing a bug that prevented the insert and update methods
 
2296
  from being created, a new callback system that allows you to specify
 
2297
  all the method names to be generated, and a new 'self_relations'
 
2298
  option for tables that have parent/child relationships with
 
2299
  themself.
2095
2300
 
2096
2301
- Fix handling of NULL columns for inserts and updates.  Now, Alzabo
2097
 
only throws an exception if the column is not nullable and has no
2098
 
default.  If it has a default and is specified as NULL then it will
2099
 
not be included in the INSERT clause (in which case the RDBMS should
2100
 
insert the default value itself).
 
2302
  only throws an exception if the column is not nullable and has no
 
2303
  default.  If it has a default and is specified as NULL then it will
 
2304
  not be included in the INSERT clause (in which case the RDBMS should
 
2305
  insert the default value itself).
2101
2306
 
2102
2307
- Fix bugs in Postgres reverse engineering.  Defaults were not handled
2103
 
properly, nor were numeric column type length and precision.
 
2308
  properly, nor were numeric column type length and precision.
2104
2309
 
2105
2310
- The schema creator and data browser now allow you to enter the host
2106
 
for database connections where needed.
 
2311
  for database connections where needed.
2107
2312
 
2108
2313
- Foreign keys can now span multiple columns.  This means you can have
2109
 
a relation from foo.foo_id and foo.index_id to bar.foo_id and
2110
 
bar.index_id.  This required some changes to the interface for the
2111
 
foreign key objects.  Notably, the Alzabo::ForeignKey->column_from and
2112
 
Alzabo::ForeignKey->column_to methods are now
2113
 
Alzabo::ForeignKey->columns_from and Alzabo::ForeignKey->columns_to.
2114
 
In addition, the parameters given to the
2115
 
Alzabo::Create::Schema->add_relation have changed.
 
2314
  a relation from foo.foo_id and foo.index_id to bar.foo_id and
 
2315
  bar.index_id.  This required some changes to the interface for the
 
2316
  foreign key objects.  Notably, the Alzabo::ForeignKey->column_from
 
2317
  and Alzabo::ForeignKey->column_to methods are now
 
2318
  Alzabo::ForeignKey->columns_from and Alzabo::ForeignKey->columns_to.
 
2319
  In addition, the parameters given to the
 
2320
  Alzabo::Create::Schema->add_relation have changed.
2116
2321
 
2117
2322
- Major changes to caching architecture.  The caching code has been
2118
 
split up.  There is now a 'storing' class, which holds onto the
2119
 
objects (the cache).  Then there is a 'sync' class.  This class
2120
 
handles expiration and deletion tracking.  These two classes can be
2121
 
mixed and matched.  Right now there is only one storage class (which
2122
 
stores the objects in memory).  There are 3 syncing classes.  One,
2123
 
NullSync, doesn't actually sync objects.  It does track deletions, but
2124
 
not expirations.  The others, IPCSync and DBMSync, use IPC or DBM
2125
 
files to track expiration and deletion of objects.
 
2323
  split up.  There is now a 'storing' class, which holds onto the
 
2324
  objects (the cache).  Then there is a 'sync' class.  This class
 
2325
  handles expiration and deletion tracking.  These two classes can be
 
2326
  mixed and matched.  Right now there is only one storage class (which
 
2327
  stores the objects in memory).  There are 3 syncing classes.  One,
 
2328
  NullSync, doesn't actually sync objects.  It does track deletions,
 
2329
  but not expirations.  The others, IPCSync and DBMSync, use IPC or
 
2330
  DBM files to track expiration and deletion of objects.
2126
2331
 
2127
2332
- Doing this work highlighted some bugs in the caching/syncing code.
2128
 
One oversight was that if you deleted an object and then inserted
2129
 
another row with the exact same primary key, the cache continued to
2130
 
think the object was deleted.  Other bugs also surfaced.  These have
2131
 
been fixed and the test suite has been updated so caching should be
2132
 
stable (if not, I'll have to cry).
 
2333
  One oversight was that if you deleted an object and then inserted
 
2334
  another row with the exact same primary key, the cache continued to
 
2335
  think the object was deleted.  Other bugs also surfaced.  These have
 
2336
  been fixed and the test suite has been updated so caching should be
 
2337
  stable (if not, I'll have to cry).
2133
2338
 
2134
2339
- When viewing an existing column in the schema creator, defaults,
2135
 
lengths, and precision of 0 were not being shown.
 
2340
  lengths, and precision of 0 were not being shown.
2136
2341
 
2137
2342
- Alzabo::Runtime::Table->row_count can now take a where clause.
2138
2343
 
2139
2344
- Fix bugs in Alzabo::Create::Table.  This was causing problems with
2140
 
indexes when the table name was changed.
 
2345
  indexes when the table name was changed.
2141
2346
 
2142
2347
- Fixed a bug in Alzabo::Util that caused the test cases to fail if
2143
 
Alzabo hadn't been previously installed.  Reported by Robert Goff.
 
2348
  Alzabo hadn't been previously installed.  Reported by Robert Goff.
2144
2349
 
2145
2350
- The SQLMaker class is now smarter about not letting you make bad
2146
 
SQL.  For example, if you try to make a WHERE clause with tables not
2147
 
mentioned in the FROM clause, it will throw an exception.  This will
2148
 
hopefully help catch logic errors in your code a bit sooner.
 
2351
  SQL.  For example, if you try to make a WHERE clause with tables not
 
2352
  mentioned in the FROM clause, it will throw an exception.  This will
 
2353
  hopefully help catch logic errors in your code a bit sooner.
2149
2354
 
2150
2355
- Removed use of prepare_cached in Alzabo::Driver.  This has the
2151
 
potential to cause some strange errors under Alzabo.  Because of the
2152
 
way Alzabo works, it is possible to have a Cursor object holding onto
2153
 
a statement handle that needs to be used elsewhere (by a row object,
2154
 
for example).  It is safer to let a new statement handle be created in
2155
 
this case.
 
2356
  potential to cause some strange errors under Alzabo.  Because of the
 
2357
  way Alzabo works, it is possible to have a Cursor object holding
 
2358
  onto a statement handle that needs to be used elsewhere (by a row
 
2359
  object, for example).  It is safer to let a new statement handle be
 
2360
  created in this case.
2156
2361
 
2157
2362
INCOMPATIBILITIES
2158
2363
 
2159
2364
- See the note above about the changes required to support
2160
 
multi-column foreign keys.
 
2365
  multi-column foreign keys.
2161
2366
 
2162
2367
- Because of the aforementioned changes to the caching architecture,
2163
 
caching just does not work the way it used to.
2164
 
 
2165
 
1. By default, there is no caching at all.
2166
 
 
2167
 
2. To get the old behavior, which defaulted to an in-process memory
2168
 
cache with no inter-process syncing (meaning deletes are tracked but
2169
 
there is no such thing as expiration), you can do this in your code:
2170
 
 
2171
 
  use Alzabo::ObjectCache( store => 'Alzabo::ObjectCache::MemoryStore',
2172
 
                           sync  => 'Alzabo::ObjectCache::NullSync' );
2173
 
 
2174
 
or just:
2175
 
 
2176
 
  use Alzabo::ObjectCache;  # the above modules are the defaults
2177
 
 
2178
 
3. To get the behavior of the old Alzabo::ObjectCacheIPC module, do:
2179
 
 
2180
 
  use Alzabo::ObjectCache( store => 'Alzabo::ObjectCache::MemoryStore',
2181
 
                           sync  => 'Alzabo::ObjectCache::IPCSync' );
2182
 
 
2183
 
However, the new DBMSync module will probably scale better, and
2184
 
performance should be about the same for smaller applications.  To use
2185
 
it, do:
2186
 
 
2187
 
  use Alzabo::ObjectCache( store => 'Alzabo::ObjectCache::MemoryStore',
2188
 
                           sync  => 'Alzabo::ObjectCache::DBMSync' );
2189
 
 
2190
 
4. If you run without any caching at all then the Alzabo::Runtime::Row
2191
 
class's behavior has changed somewhat.  In particular, selects or
2192
 
updates against a deleted object will always throw an
2193
 
Alzabo::Exception::NoSuchRow exception.  Before, the behavior wasn't
2194
 
very well defined.
2195
 
 
2196
 
Please read the section on clearing the cache in the
2197
 
Alzabo::ObjectCache module, as this is an important concept.  By
2198
 
default, the caching and syncing modules will just grow unchecked.
2199
 
You need to clear at the appropriate points (usually your
2200
 
application's entry points) in order to keep them under control.
 
2368
  caching just does not work the way it used to.
 
2369
 
 
2370
  1. By default, there is no caching at all.
 
2371
 
 
2372
  2. To get the old behavior, which defaulted to an in-process memory
 
2373
  cache with no inter-process syncing (meaning deletes are tracked but
 
2374
  there is no such thing as expiration), you can do this in your code:
 
2375
 
 
2376
    use Alzabo::ObjectCache( store => 'Alzabo::ObjectCache::MemoryStore',
 
2377
                             sync  => 'Alzabo::ObjectCache::NullSync' );
 
2378
 
 
2379
  or just:
 
2380
 
 
2381
    use Alzabo::ObjectCache;  # the above modules are the defaults
 
2382
 
 
2383
  3. To get the behavior of the old Alzabo::ObjectCacheIPC module, do:
 
2384
 
 
2385
    use Alzabo::ObjectCache( store => 'Alzabo::ObjectCache::MemoryStore',
 
2386
                             sync  => 'Alzabo::ObjectCache::IPCSync' );
 
2387
 
 
2388
  However, the new DBMSync module will probably scale better, and
 
2389
  performance should be about the same for smaller applications.  To
 
2390
  use it, do:
 
2391
 
 
2392
    use Alzabo::ObjectCache( store => 'Alzabo::ObjectCache::MemoryStore',
 
2393
                             sync  => 'Alzabo::ObjectCache::DBMSync' );
 
2394
 
 
2395
  4. If you run without any caching at all then the
 
2396
  Alzabo::Runtime::Row class's behavior has changed somewhat.  In
 
2397
  particular, selects or updates against a deleted object will always
 
2398
  throw an Alzabo::Exception::NoSuchRow exception.  Before, the
 
2399
  behavior wasn't very well defined.
 
2400
 
 
2401
  Please read the section on clearing the cache in the
 
2402
  Alzabo::ObjectCache module, as this is an important concept.  By
 
2403
  default, the caching and syncing modules will just grow unchecked.
 
2404
  You need to clear at the appropriate points (usually your
 
2405
  application's entry points) in order to keep them under control.
2201
2406
 
2202
2407
---------------------------------------------------------------------------
2203
2408
 
2204
2409
0.20 Jan 9, 2001
2205
2410
 
2206
2411
- Preliminary Postgres support.  There is no support yet for
2207
 
constraints or foreign keys when reverse engineering or making SQL.
2208
 
There is also no support for large objects (I'm hoping that 7.1 will
2209
 
be released soon so I won't have to think about this).  Otherwise, the
2210
 
support is about at the same level as MySQL support, though less
2211
 
mature.
 
2412
  constraints or foreign keys when reverse engineering or making SQL.
 
2413
  There is also no support for large objects (I'm hoping that 7.1 will
 
2414
  be released soon so I won't have to think about this).  Otherwise,
 
2415
  the support is about at the same level as MySQL support, though less
 
2416
  mature.
2212
2417
 
2213
2418
- Added Alzabo::MethodMaker module.  This can be used to auto-generate
2214
 
useful methods for your schema/table/row objects based on the
2215
 
properties of your objects themselves.
 
2419
  useful methods for your schema/table/row objects based on the
 
2420
  properties of your objects themselves.
2216
2421
 
2217
2422
- Reworking/expanding/clarifying/editing of the docs.
2218
2423
 
2219
2424
- Add order_by and limit options whenever creating a cursor.
2220
2425
 
2221
2426
- Method documentation POD from the Alzabo::* modules is merged into
2222
 
the relevant Alzabo::Create::* and Alzabo::Runtime::* modules during
2223
 
install.  This should make it easier to find what you need since the
2224
 
average user will only need to look at a few modules in
2225
 
Alzabo::Runtime::*.
 
2427
  the relevant Alzabo::Create::* and Alzabo::Runtime::* modules during
 
2428
  install.  This should make it easier to find what you need since the
 
2429
  average user will only need to look at a few modules in
 
2430
  Alzabo::Runtime::*.
2226
2431
 
2227
 
- Reworked exceptions so they are all now Alzabo::Exception::Something.
 
2432
- Reworked exceptions so they are all now
 
2433
  Alzabo::Exception::Something.
2228
2434
 
2229
2435
- Added default as a column attribute (thus there are now
2230
 
Alzabo::Column->default and Alzabo::Create::Column->set_default
2231
 
methods).
 
2436
  Alzabo::Column->default and Alzabo::Create::Column->set_default
 
2437
  methods).
2232
2438
 
2233
2439
- Added length & precision attributes for columns.  Both are set
2234
 
through the Alzabo::Create::Column->set_length method.
 
2440
  through the Alzabo::Create::Column->set_length method.
2235
2441
 
2236
2442
- This release includes a script in eg/ called convert.pl to convert
2237
 
older schemas.
 
2443
  older schemas.
2238
2444
 
2239
2445
- Alzabo::Schema->tables & Alzabo::Table->columns now take an optional
2240
 
list of tables/columns as an argument and return a list of matching
2241
 
objects.
 
2446
  list of tables/columns as an argument and return a list of matching
 
2447
  objects.
2242
2448
 
2243
2449
- Added Alzabo::Column->has_attribute method.
2244
2450
 
2245
2451
- The data browser has actually lost some functionality (the
2246
 
filtering).  Making this more powerful is a fairly low priority at the
2247
 
moment.
 
2452
  filtering).  Making this more powerful is a fairly low priority at
 
2453
  the moment.
2248
2454
 
2249
2455
- Fix bugs where extra params passed to Alzabo::Runtime::Table->insert
2250
 
were not making it to the Alzabo::Runtime::Row->new method.
 
2456
  were not making it to the Alzabo::Runtime::Row->new method.
2251
2457
 
2252
2458
- Fix for Alzabo::Runtime::Table->set_prefetch method.
2253
2459
 
2254
2460
- Fixed bug in handling of deleted object in Alzabo::ObjectCacheIPC
2255
 
(they were never reported as deleted).
 
2461
  (they were never reported as deleted).
2256
2462
 
2257
2463
- Fix bug that caused schema to get bigger every time it was saved.
2258
2464
 
2259
2465
- Finally switched to regular hashes for objects.
2260
2466
 
2261
 
- Added Alzabo::SQLMaker classes to handle generating SQL
2262
 
in a cross-platform compatible way.
 
2467
- Added Alzabo::SQLMaker classes to handle generating SQL in a
 
2468
  cross-platform compatible way.
2263
2469
 
2264
2470
DEPRECATIONS:
2265
2471
 
2266
2472
- Parameters for Alzabo::Create::Column->new: 'null' parameter is now
2267
 
'nullable'.  The use of the parameter 'null' is deprecated.
 
2473
  'nullable'.  The use of the parameter 'null' is deprecated.
2268
2474
 
2269
2475
- Alzabo::Column->null & Alzabo::Column->set_null methods are now
2270
 
Alzabo::Column->nullable & Alzabo::Column->set_nullable.  The old
2271
 
methods are deprecated.
 
2476
  Alzabo::Column->nullable & Alzabo::Column->set_nullable.  The old
 
2477
  methods are deprecated.
2272
2478
 
2273
2479
- Alzabo::Create::ForeignKey->new no longer requires table_from &
2274
 
table_to params (it took me this long to realize I can get that from
2275
 
the column passed in.  doh!)
 
2480
  table_to params (it took me this long to realize I can get that from
 
2481
  the column passed in.  doh!)
2276
2482
 
2277
2483
INCOMPATIBILITIES:
2278
2484
 
2279
2485
- Alzabo::Runtime::Table->rows_where parameters have changed.  The
2280
 
from parameter has been removed (use the Alzabo::Runtime::Schema->join
2281
 
method instead).  The where parameter expects something different now.
 
2486
  from parameter has been removed (use the
 
2487
  Alzabo::Runtime::Schema->join method instead).  The where parameter
 
2488
  expects something different now.
2282
2489
 
2283
2490
- Alzabo::Runtime::Table->rows_by_where_clause method has been
2284
 
removed.
 
2491
  removed.
2285
2492
 
2286
2493
- Alzabo::Runtime::Schema->join method's where parameter expects
2287
 
something different.
 
2494
  something different.
2288
2495
 
2289
2496
---------------------------------------------------------------------------
2290
2497
 
2291
2498
0.10_5 Oct 10, 2000
2292
2499
 
2293
2500
- You can now specify a database name to be used for testing.  The
2294
 
default is 'test_alzabo'.  This a good default for MySQL, at least.
2295
 
Thanks to Randal Schwartz for the help.
 
2501
  default is 'test_alzabo'.  This a good default for MySQL, at least.
 
2502
  Thanks to Randal Schwartz for the help.
2296
2503
 
2297
2504
- Make sure test file cleanup is done _before_ attempting tests so
2298
 
that files from a test previously aborted are cleaned up (and no
2299
 
errors are generated.  Thanks to Randal Schwartz for the bug report.
 
2505
  that files from a test previously aborted are cleaned up (and no
 
2506
  errors are generated.  Thanks to Randal Schwartz for the bug report.
2300
2507
 
2301
2508
- Doesn't fail on install for Mason components if no Mason component
2302
 
extension was given.  Thanks _again_ to Randal for working with me on
2303
 
this in IRC late at night.
 
2509
  extension was given.  Thanks _again_ to Randal for working with me
 
2510
  on this in IRC late at night.
2304
2511
 
2305
2512
---------------------------------------------------------------------------
2306
2513
 
2309
2516
- Fix Makefile.PL bug
2310
2517
 
2311
2518
- Auto select a column when adding a relation (if there is a logical
2312
 
one to select).
 
2519
  one to select).
2313
2520
 
2314
2521
---------------------------------------------------------------------------
2315
2522
 
2321
2528
 
2322
2529
0.10
2323
2530
 
2324
 
**FIRST BETA VERSION**
 
2531
  **FIRST BETA VERSION**
2325
2532
 
2326
2533
- Doc bug fixes in Alzabo::Runtime::Schema.
2327
2534
 
2328
2535
- Fix fact that Alzabo::Runtime::Row rows_by_foreign_key method could
2329
 
return either a Row _or_ RowCursor object.  Now it always returns a
2330
 
cursor object.
 
2536
  return either a Row _or_ RowCursor object.  Now it always returns a
 
2537
  cursor object.
2331
2538
 
2332
2539
- Fix fact that no_cache parameter was not propagated through the
2333
 
RowCursor object to the rows it created.
 
2540
  RowCursor object to the rows it created.
2334
2541
 
2335
2542
- Add all all_rows method to Alzabo::Runtime::RowCursor.
2336
2543
 
2337
2544
- Add ability to reset instantiation flag in schema creation
2338
 
interface.
 
2545
  interface.
2339
2546
 
2340
2547
- Updated INSTALL to mention how to get the schema creator and data
2341
 
browser working.
 
2548
  browser working.
2342
2549
 
2343
2550
- Finally make creating relations between tables _without_ specifying
2344
 
the columns work.  This does some, IMHO, pretty cool DWIMmery.
 
2551
  the columns work.  This does some, IMHO, pretty cool DWIMmery.
2345
2552
 
2346
2553
- Added primary_key param to Alzabo::Runtime::Table make_column
2347
 
method.
 
2554
  method.
2348
2555
 
2349
2556
- Added set_host and host methods to Alzabo::Runtime::Schema.
2350
2557
 
2351
2558
- Added drop method to Alzabo::Create::Schema and necessary support in
2352
 
driver modules.
 
2559
  driver modules.
2353
2560
 
2354
2561
- Changed 'id' param to 'pk' for Alzabo::Runtime::Table row_by_pk
2355
 
method.  'id' still works, for now, but is deprecated.
 
2562
  method.  'id' still works, for now, but is deprecated.
2356
2563
 
2357
2564
- Fix problem where an insert could generate a referential integrity
2358
 
exception but still end up in the database.  Note, without
2359
 
transactions (in MySQL, for example), there's no way to make the all
2360
 
of the referential integrity code work correctly 100% of the time.
 
2565
  exception but still end up in the database.  Note, without
 
2566
  transactions (in MySQL, for example), there's no way to make the all
 
2567
  of the referential integrity code work correctly 100% of the time.
2361
2568
 
2362
2569
- Added new class Alzabo::ObjectCache to make sure that objects stay
2363
 
in sync after referential integrity operations happen.  This is now
2364
 
the default caching class.  Please make sure to read the docs for this
2365
 
new module, particularly if you're running Alzabo under a persistent
2366
 
environment where this module can be quite the memory hog if not used
2367
 
properly (clear the cache!).
 
2570
  in sync after referential integrity operations happen.  This is now
 
2571
  the default caching class.  Please make sure to read the docs for
 
2572
  this new module, particularly if you're running Alzabo under a
 
2573
  persistent environment where this module can be quite the memory hog
 
2574
  if not used properly (clear the cache!).
2368
2575
 
2369
2576
- Fixed breakage in maintenance of referential integrity caused by
2370
 
switch to cursors (and me not fixing all the code that expected row
2371
 
objects).
 
2577
  switch to cursors (and me not fixing all the code that expected row
 
2578
  objects).
2372
2579
 
2373
2580
- Added Alzabo::Runtime::Cursor base class.
2374
2581
 
2379
2586
- Began conversion of all classes from pseudohash to hash.
2380
2587
 
2381
2588
- Both schema creator and data browser now respect user choice of
2382
 
component extension.
 
2589
  component extension.
2383
2590
 
2384
2591
---------------------------------------------------------------------------
2385
2592
 
2386
2593
0.09
2387
2594
 
2388
2595
- MAJOR CHANGE: All the Alzabo::Runtime::Row methods that used to
2389
 
return lists of rows now return the new Alzabo::Runtime::RowCursor
2390
 
object.  This change is a major speed and memory optimization.  It
2391
 
does, however, break the old interface.  But its worth it.
 
2596
  return lists of rows now return the new Alzabo::Runtime::RowCursor
 
2597
  object.  This change is a major speed and memory optimization.  It
 
2598
  does, however, break the old interface.  But its worth it.
2392
2599
 
2393
2600
- Set autohandlers for schema maker and data browser so that they
2394
 
won't inherit from other autohandlers higher up the directory tree.
 
2601
  won't inherit from other autohandlers higher up the directory tree.
2395
2602
 
2396
2603
- Fix bug in Alzabo::Driver which made it so that the one_row_hash
2397
 
method always returned a hash with keys.  This caused spurious row
2398
 
object to be created in the Alzabo::Runtime::Row class.
 
2604
  method always returned a hash with keys.  This caused spurious row
 
2605
  object to be created in the Alzabo::Runtime::Row class.
2399
2606
 
2400
2607
- Fix bug in Alzabo::Table::rows_where method where it wasn't handling
2401
 
the construct $table->rows_where( where => { foo => undef } )
2402
 
properly.
 
2608
  the construct $table->rows_where( where => { foo => undef } )
 
2609
  properly.
2403
2610
 
2404
2611
---------------------------------------------------------------------------
2405
2612
 
2406
2613
0.08
2407
2614
 
2408
2615
- Lazy column evaluation had made it possible to create an
2409
 
Alzabo::Runtime::Row object that did not correspond to any data in the
2410
 
database if its table object did specify any rows to prefetch.  This
2411
 
would have only been discovered later by calling the select method on
2412
 
a non-primary key column.  This hole was plugged.
 
2616
  Alzabo::Runtime::Row object that did not correspond to any data in
 
2617
  the database if its table object did specify any rows to prefetch.
 
2618
  This would have only been discovered later by calling the select
 
2619
  method on a non-primary key column.  This hole was plugged.
2413
2620
 
2414
2621
- As a corollary to the above change methods in Alzabo::Runtime::Table
2415
 
that produce rows now always return an empty list or undef when the
2416
 
rows cannot be made because the specified primary key doesn't exist.
2417
 
Previously, the rows_by_where_clause method did this while others
2418
 
would cause an exception either during the object creation or later,
2419
 
depending upon the situation described above.
 
2622
  that produce rows now always return an empty list or undef when the
 
2623
  rows cannot be made because the specified primary key doesn't exist.
 
2624
  Previously, the rows_by_where_clause method did this while others
 
2625
  would cause an exception either during the object creation or later,
 
2626
  depending upon the situation described above.
2420
2627
 
2421
2628
- GENERAL NOTE: I probably used exceptions too much, as in the above
2422
 
case.  I will probably be making a few more changes like this in the
2423
 
future.
 
2629
  case.  I will probably be making a few more changes like this in the
 
2630
  future.
2424
2631
 
2425
2632
- Bug fix in Alzabo::RDBMSRules when making SQL diffs.  Forgot to
2426
 
account for new foreign key method names.
 
2633
  account for new foreign key method names.
2427
2634
 
2428
2635
- Bug fix related to MySQL auto_increment column and
2429
 
Alzabo::Runtime::Table insert method.  Basically, you couldn't insert
2430
 
into a table and use its auto_increment feature.
 
2636
  Alzabo::Runtime::Table insert method.  Basically, you couldn't
 
2637
  insert into a table and use its auto_increment feature.
2431
2638
 
2432
2639
- Alzabo::Table::set_prefetch now makes sure that primary key columns
2433
 
are not included.  It simply ignores them but they will not be
2434
 
returned by the prefetch method.
 
2640
  are not included.  It simply ignores them but they will not be
 
2641
  returned by the prefetch method.
2435
2642
 
2436
2643
- fix bug where some row retrieval methods would fail if not given a
2437
 
'bind' parameter.
 
2644
  'bind' parameter.
2438
2645
 
2439
2646
- Doc bug fix.  Docs for Alzabo::Runtime::Table listed group_by_column
2440
 
as simply group.  Of course, this probably only needs to be used by
2441
 
Alzabo::Runtime::Row anyway.
 
2647
  as simply group.  Of course, this probably only needs to be used by
 
2648
  Alzabo::Runtime::Row anyway.
2442
2649
 
2443
2650
- Added Alzabo::Runtime::Table rows_where method.
2444
2651
 
2445
2652
- Added Alzabo::Runtime::Table all_rows method.
2446
2653
 
2447
2654
- Documented 'bind' parameter for Alzabo::Runtime::Table
2448
 
rows_by_where_clause method.
 
2655
  rows_by_where_clause method.
2449
2656
 
2450
2657
---------------------------------------------------------------------------
2451
2658
 
2454
2661
- Fixed major bugs in Alzabo::Runtime::Table::insert method.
2455
2662
 
2456
2663
- Fixed bug in Alzabo::Runtime::Row::delete method related to API
2457
 
change in 0.06
 
2664
  change in 0.06
2458
2665
 
2459
2666
- Reduce amount of work done in Alzabo::Runtime::Row when referential
2460
 
integrity maintenance is set to false.
 
2667
  integrity maintenance is set to false.
2461
2668
 
2462
2669
- Added new method to Alzabo::Runtime::Row: rows_by_foreign_key.  A
2463
 
row can now fetch the rows that are related to it automatically.
 
2670
  row can now fetch the rows that are related to it automatically.
2464
2671
 
2465
2672
- Made all Alzabo::Table foreign key object returning methods
2466
 
list/scalar context sensitive.  This is useful when you know that
2467
 
there is only one foreign key that matches what you are looking for.
 
2673
  list/scalar context sensitive.  This is useful when you know that
 
2674
  there is only one foreign key that matches what you are looking for.
2468
2675
 
2469
2676
---------------------------------------------------------------------------
2470
2677
 
2471
2678
0.06
2472
2679
 
2473
2680
- change return value from Alzabo::Index id method to be something
2474
 
that can be an actual index name.  This is a bug fix as previously
2475
 
index SQL was not valid (at least not for MySQL).
 
2681
  that can be an actual index name.  This is a bug fix as previously
 
2682
  index SQL was not valid (at least not for MySQL).
2476
2683
 
2477
2684
- cosmetic fixes in schema creator
2478
2685
 
2479
2686
- moved exception component to common mason files so its shared by
2480
 
schema creator and data browser.
 
2687
  schema creator and data browser.
2481
2688
 
2482
2689
- added Index attribute of unique (so we can make unique indexes).
2483
2690
 
2488
2695
- added ability to specify column order in an index in schema creator.
2489
2696
 
2490
2697
- made it possible for a table to have more than one foreign from a
2491
 
given column.  documented how this changes API in Alzbo::Table.
 
2698
  given column.  documented how this changes API in Alzbo::Table.
2492
2699
 
2493
2700
- API: The Alzabo::Table foreign_keys() method name has been changed
2494
 
to all_foreign_keys().  The foreign_key method (which returns keys by
2495
 
table to and column from) is now the foreign_keys() method because it
2496
 
can return more than one object.
 
2701
  to all_foreign_keys().  The foreign_key method (which returns keys
 
2702
  by table to and column from) is now the foreign_keys() method
 
2703
  because it can return more than one object.
2497
2704
 
2498
2705
- change schema creator, Alzabo::Create::Schema module, and
2499
 
03/create.t test to handle this properly.
 
2706
  03/create.t test to handle this properly.
2500
2707
 
2501
2708
- added ability to move columns and tables to arbitrary new locations
2502
 
after they've been created (without the arrows).
 
2709
  after they've been created (without the arrows).
2503
2710
 
2504
2711
---------------------------------------------------------------------------
2505
2712
 
2506
2713
0.05
2507
2714
 
2508
2715
- bug fix for Alzabo::Runtime::Row calling wrong method from schema
2509
 
object
 
2716
  object
2510
2717
 
2511
2718
- got rid of the locking stuff in the MySQL driver.  Since its not
2512
 
possible to have more than 1 lock at a time with the GET_LOCK function
2513
 
there's no way to have the right kinds of locks for cascading deletes.
2514
 
It might be possible to do this kind of locking via some other
2515
 
mechanism (semaphores, DBM files, whatever, but that's a hack for
2516
 
another day.
 
2719
  possible to have more than 1 lock at a time with the GET_LOCK
 
2720
  function there's no way to have the right kinds of locks for
 
2721
  cascading deletes.  It might be possible to do this kind of locking
 
2722
  via some other mechanism (semaphores, DBM files, whatever, but
 
2723
  that's a hack for another day.
2517
2724
 
2518
2725
---------------------------------------------------------------------------
2519
2726
 
2524
2731
- fixed stupid bug in Alzabo::RDBMSRules::MySQL
2525
2732
 
2526
2733
- changed the way Alzabo::ChangeTracker works.  it requires fewer
2527
 
method calls to do its job now.
 
2734
  method calls to do its job now.
2528
2735
 
2529
2736
- added set_referential_integrity/referential_integrity methods to
2530
 
Alzabo::Runtime::Schema.  The default is to not attempt to maintain
2531
 
referential_integrity.
 
2737
  Alzabo::Runtime::Schema.  The default is to not attempt to maintain
 
2738
  referential_integrity.
2532
2739
 
2533
2740
- It should no longer be possible for Alzabo::Runtime::ForeignKey
2534
 
objects to create loops when maintaining referential integrity.  It
2535
 
also should be a bit more efficient in the register_delete method.  If
2536
 
no action needs to be taken, it won't loop through all the rows in the
2537
 
related table before finding this out.
 
2741
  objects to create loops when maintaining referential integrity.  It
 
2742
  also should be a bit more efficient in the register_delete method.
 
2743
  If no action needs to be taken, it won't loop through all the rows
 
2744
  in the related table before finding this out.
2538
2745
 
2539
2746
- fixed data browser bug when putting in a filter on any page that was
2540
 
not the first page of results for a table.
 
2747
  not the first page of results for a table.
2541
2748
 
2542
2749
- fixed data browser bug in paging with filters.
2543
2750
 
2558
2765
- minor buglet fix in Alzabo::Driver::MySQL
2559
2766
 
2560
2767
- big fix to how Alzabo::Runtime::Schema is saved from
2561
 
Alzabo::Create::Schema.  Previous implementation was accidentally
2562
 
saving both the runtime and create versions at once.  The new version
2563
 
fixes this.
 
2768
  Alzabo::Create::Schema.  Previous implementation was accidentally
 
2769
  saving both the runtime and create versions at once.  The new
 
2770
  version fixes this.