From: David Jack Olrik Date: Sat, 3 Mar 2007 17:58:21 +0000 (+0000) Subject: Merge 'trunk' into 'DBIx-Class-current' X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=90545b68b06c2d2d288d593462539fe45fff48a6;p=dbsrgits%2FDBIx-Class-Historic.git Merge 'trunk' into 'DBIx-Class-current' r27233@ip-37-237 (orig r3005): castaway | 2007-01-05 10:25:11 +0100 add inflatecolumn fixes to Changes r27496@ip-37-237 (orig r3007): castaway | 2007-01-09 22:20:55 +0100 todoify collapse test r27497@ip-37-237 (orig r3008): castaway | 2007-01-09 22:42:59 +0100 Up version to 0.07004 r27498@ip-37-237 (orig r3009): castaway | 2007-01-09 22:44:39 +0100 0.07004 r27499@ip-37-237 (orig r3010): castaway | 2007-01-10 18:54:19 +0100 Skip .orig files in dist r27500@ip-37-237 (orig r3011): castaway | 2007-01-10 20:37:23 +0100 oops, remove .orig files etc r27546@ip-37-237 (orig r3053): zarquon | 2007-01-23 11:15:05 +0100 minor doc improvement to clarify how to do joins r27720@ip-37-237 (orig r3058): zarquon | 2007-01-24 22:48:07 +0100 explained a cryptic error message r27732@ip-37-237 (orig r3064): castaway | 2007-01-29 17:28:12 +0100 Make POD a little more obvious about component order --This line, and those below, will be ignored-- M DateTime.pm r27738@ip-37-237 (orig r3070): jester | 2007-02-01 00:59:06 +0100 Doc cleanup in Ordered.pm r27740@ip-37-237 (orig r3072): castaway | 2007-02-02 20:48:53 +0100 POD updates r27741@ip-37-237 (orig r3073): ash | 2007-02-03 22:33:19 +0100 Made ->update not change the hashref passed in (with test.) r27743@ip-37-237 (orig r3075): ash | 2007-02-05 13:29:52 +0100 Backed out my r3073, and doc'd the fact that it takes a hashref that might be changed r27744@ip-37-237 (orig r3076): castaway | 2007-02-05 14:56:35 +0100 Add _accessor example, thanks to grinktt3n r27745@ip-37-237 (orig r3077): castaway | 2007-02-05 15:23:22 +0100 Fix overload example r27747@ip-37-237 (orig r3079): grink1tt3n | 2007-02-06 20:40:00 +0100 Added; FAQ-fetch-a-formatted-column.txt FAQ-store-JSON-in-a-column.txt r27762@ip-37-237 (orig r3094): castaway | 2007-02-08 09:25:54 +0100 Argh! Fix spurious example r27765@ip-37-237 (orig r3097): castaway | 2007-02-13 15:00:21 +0100 Improve resultset_attributes docs r27766@ip-37-237 (orig r3098): grink1tt3n | 2007-02-14 08:16:40 +0100 Fleshed out the JSON inflated column example with a corresponding YAML example. Added a cautionary warning against overuse. Added a link to InflateColumn. r27767@ip-37-237 (orig r3099): grink1tt3n | 2007-02-14 09:39:26 +0100 Added how to '.. fetch a single (or topmost) row?' to the FAQ r27768@ip-37-237 (orig r3100): zarquon | 2007-02-14 09:44:18 +0100 improved docs for as attrib r27769@ip-37-237 (orig r3101): zarquon | 2007-02-14 11:05:51 +0100 pointed out ambiguity of as attribs r27967@ip-37-237 (orig r3107): castaway | 2007-03-03 13:15:03 +0100 Fix to $filename from Carl Vincent --- 90545b68b06c2d2d288d593462539fe45fff48a6 diff --cc lib/DBIx/Class/Ordered.pm index d5a7a00,35ceba4..88e1110 --- a/lib/DBIx/Class/Ordered.pm +++ b/lib/DBIx/Class/Ordered.pm @@@ -17,28 -17,9 +17,8 @@@ Create a table for your ordered data name TEXT NOT NULL, position INTEGER NOT NULL ); - # Optional: group_id INTEGER NOT NULL - Optionally, add one or more columns to specify groupings, allowing you - to maintain independent ordered lists within one table: - - CREATE TABLE items ( - item_id INTEGER PRIMARY KEY AUTOINCREMENT, - name TEXT NOT NULL, - position INTEGER NOT NULL, - group_id INTEGER NOT NULL - ); - - Or even - - CREATE TABLE items ( - item_id INTEGER PRIMARY KEY AUTOINCREMENT, - name TEXT NOT NULL, - position INTEGER NOT NULL, - group_id INTEGER NOT NULL, - other_group_id INTEGER NOT NULL - ); - - In your Schema or DB class add Ordered to the top + In your Schema or DB class add "Ordered" to the top of the component list. __PACKAGE__->load_components(qw( Ordered ... )); @@@ -48,16 -29,9 +28,8 @@@ each row package My::Item; __PACKAGE__->position_column('position'); - __PACKAGE__->grouping_column('group_id'); # optional - If you are using one grouping column, specify it as follows: - - __PACKAGE__->grouping_column('group_id'); - - Or if you have multiple grouping columns: - - __PACKAGE__->grouping_column(['group_id', 'other_group_id']); - - Thats it, now you can change the position of your objects. + That's it, now you can change the position of your objects. #!/use/bin/perl use My::Item; diff --cc lib/DBIx/Class/Schema.pm index 4478d6f,3ab14fd..58a59db --- a/lib/DBIx/Class/Schema.pm +++ b/lib/DBIx/Class/Schema.pm @@@ -1004,12 -785,11 +1004,12 @@@ format =cut sub ddl_filename { - my ($self, $type, $dir, $version) = @_; + my ($self, $type, $dir, $version, $pversion) = @_; my $filename = ref($self); - $filename =~ s/::/-/; + $filename =~ s/::/-/g; - $filename = "$dir$filename-$version-$type.sql"; + $filename = File::Spec->catfile($dir, "$filename-$version-$type.sql"); + $filename =~ s/$version/$pversion-$version/ if($pversion); return $filename; }