User Tools

Site Tools


podoc:preferences_sql_table

This is an old revision of the document!


Database Table Description of "preferences"

Name

preferences

Description

Purpose

Schema

create table preferences (
  identifier                integer not null primary key,
  print_out                 char(3) check (print_out in ('ps', 'pdf')),
  start_hour                integer check (start_hour >= 0 and start_hour < 24),
  end_hour                  integer check (start_hour >= 0 and start_hour < 24),
  start_day                 integer check (start_day in (1, 0)),
  num_of_rows               integer,
  num_of_columns            integer,
  copyright_statement       text,
  folder_view               char(5) check (folder_view in ('slide', 'list')),
  num_of_rows_l             integer,
  sharpen_image_radius      float,
  sharpen_image_sigma       float,
  sharpen_thumb_radius      float,
  sharpen_thumb_sigma       float,
  copyright_statement_photo text,
  bulk_upload_enable        char(1) check (bulk_upload_enable in ('t', 'f')),
  paper                     integer references paper(identifier),
  label                     integer references label(identifier)
  shop_enable               char(1) check (shop_enable in ('t', 'f'));
  popup_enable              char(1) check (shop_enable in ('t', 'f'));
  popup_delay               integer;
);

History

Used first

Version 2.5

Used last

Still in use

Schema change history

= Version 2.5 =

create table preferences (
  identifier            integer not null primary key,
  print_out             char(3) check (print_out in ('ps', 'pdf')),
  start_hour            integer check (start_hour >= 0 and start_hour < 24),
  end_hour              integer check (start_hour >= 0 and start_hour < 24),
  start_day             integer check (start_day in (1, 0)),
  num_of_rows           integer,
  num_of_columns        integer,
  copyright_statement   text,
  folder_view           char(5) check (folder_view in ('slide', 'list')),
  num_of_rows_l         integer,
  sharpen_image_radius  float,
  sharpen_image_sigma   float,
  sharpen_thumb_radius  float,
  sharpen_thumb_sigma   float,
  current_volume        varchar(500),
  volume_max_size       integer
);

= Version 2.6 =

alter table preferences add column copyright_statement_photo text;
alter table preferences add column bulk_upload_enable char(1) check (bulk_upload_enable in ('t', 'f'));
alter table preferences add column paper integer references paper(identifier);
alter table preferences add column label integer references label(identifier);

= Version 2.7 =

-- extend system preferences table with the current volume and upper size limit
alter table system_preferences add column current_volume varchar(500);
alter table system_preferences add column volume_max_size integer;

= Version 2.8 =

alter table preferences add column shop_enable  char(1) check (shop_enable in ('t', 'f'));
alter table preferences add column popup_enable char(1) check (shop_enable in ('t', 'f'));
alter table preferences add column popup_delay  integer;
Data change history

= Version 2.5 =

insert into preferences values (1, 'pdf', '8', '20', '1', 4, 4, '', 'slide', '20', 0.2, 0.2, 0.4, 0.4);

= Version 2.6 =

-- set bulk upload flag to false for everybody except the administrator
update preferences set bulk_upload_enable='f';
update preferences set bulk_upload_enable='t' where identifier = (select preferences from users where type=4);
update preferences set paper='13';
update preferences set label='17';

= Version 2.7 =

update system_preferences set volume_max_size=640;

= Version 2.8 =

update preferences set shop_enable ='f';
update preferences set popup_enable='f';
update preferences set popup_delay =500;
update preferences set shop_enable ='t' where identifier = (select preferences from users where type=4);
update preferences set popup_enable='t' where identifier = (select preferences from users where type=4);
podoc/preferences_sql_table.1176724197.txt.gz · Last modified: 2007/04/16 11:49 by Luud