Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b2c8f7e5

Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt

  • ID b2c8f7e55e707a302c2bb9a9db9089cc9550bcad
  • Vorgänger b1d1683b
  • Nachfolger a992797b

File: um eindeutigen Identifer erweitert (uid)

Unterschiede anzeigen:

SL/DB/MetaSetup/File.pm
23 23
  print_variant => { type => 'text' },
24 24
  source        => { type => 'text', not_null => 1 },
25 25
  title         => { type => 'varchar', length => 45 },
26
  uid           => { type => 'text' },
26 27
);
27 28

  
28 29
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
SL/File.pm
54 54
  push @query, (mime_type     => $params{mime_type})     if $params{mime_type};
55 55
  push @query, (source        => $params{source})        if $params{source};
56 56
  push @query, (print_variant => $params{print_variant}) if $params{print_variant};
57
  push @query, (uid           => $params{uid})           if $params{uid};
57 58

  
58 59
  my $sortby = $params{sort_by} || 'itime DESC,file_name ASC';
59 60

  
......
105 106
  push @query, (mime_type     => $params{mime_type})     if $params{mime_type};
106 107
  push @query, (source        => $params{source})        if $params{source};
107 108
  push @query, (print_variant => $params{print_variant}) if $params{print_variant};
109
  push @query, (uid           => $params{uid})           if $params{uid};
108 110

  
109 111
  my $cnt = SL::DB::Manager::File->get_all_count(query => [@query]);
110 112
  return $cnt;
......
222 224
        title          => $params{title},
223 225
        description    => $params{description},
224 226
        print_variant  => $params{print_variant},
227
        uid            => $params{uid},
225 228
      );
226 229
      $file->itime($params{mtime})    if $params{mtime};
227 230
      $params{itime} = $params{mtime} if $params{mtime};
......
293 296
                                                  mime_type     => $file->mime_type,
294 297
                                                  source        => $file->source,
295 298
                                                  file_type     => $file->file_type,
299
                                                  uid           => $file->uid,
296 300
                                                  file_name     => $params{to}
297 301
                                                ) > 0;
298 302

  
sql/Pg-upgrade2/files_add_uid.sql
1
-- @tag: files_add_uid
2
-- @description: unique Identifier (UID) für DMS System
3
-- @depends: release_3_8_0
4

  
5
ALTER TABLE files ADD COLUMN uid text;

Auch abrufbar als: Unified diff