-my $maxid = 0;
-while(<IN>) {
- if(/COPY \"rooms\" FROM stdin;/) {
- while(<IN>) {
- if(/\\\./) {
- last;
- } elsif(/(\d+)\t([^\t]*)\t(\d{4}-\d\d-\d\d)\t(\d\d:\d\d:\d\d)\t(\d\d:\d\d:\d\d)\t([a-zA-Z0-9\.-]+)\t([^\t]*)\t([^\t]*)\t(t|f)/) {
- $i++;
- # FIXME convert the timeslices!!!
- # FIXME insert the right table name and rs_weekly
- # ignore uid, it is serial, also class is not used anymore
- # print $tsbeginoldkeys{$4}; print "\n";
- IServ::DB::Put "roomschedule", { "rs_room" => $2, "rs_date" => $3,
- "rs_tsfirst" => $tsbeginoldkeys{$4}, "rs_tslast" => $tsendoldkeys{$5},
- "rs_act" => $6, "rs_reason" => $8, "rs_weekly" => $9 };
- }
- }
- }
-}
-print "$i datasets converted.\ndone!\n";