Skip to content
Snippets Groups Projects
Commit 1c406e48 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Populate the database with /movies/dc, /movies/olymp, and the media

batches that I currently have.
(media_batch): New table.
(media): New column: batch_id.
parent 0e1b8a67
No related branches found
No related tags found
No related merge requests found
...@@ -37,8 +37,31 @@ create table file ( ...@@ -37,8 +37,31 @@ create table file (
INDEX(size) INDEX(size)
); );
create table media_batch (
batch_id int32 auto_increment primary key not null,
purchase_date datetime not null,
# Capacity in number of blocks.
capacity int32 not null,
# 2048 for CD-R and CD-RW.
blocksize int16 not null,
# True for CD-R, false for CD-RW.
permanent bool not null,
speed int16 not null,
manufacturer varchar(255) not null,
label varchar(255) not null,
INDEX(permanent)
);
create table media ( create table media (
media_id int32 auto_increment primary key not null, media_id int32 auto_increment primary key not null,
batch_id int32 not null references media_batch(batch_id),
written datetime not null, written datetime not null,
verified datetime null, verified datetime null,
broken bool not null, broken bool not null,
...@@ -55,5 +78,26 @@ create table contents ( ...@@ -55,5 +78,26 @@ create table contents (
INDEX(media) INDEX(media)
); );
insert into base (dir_name, active) values ("/movies/olympcopy", 1); insert into base (dir_name, active) values ("/movies/olymp", 1);
insert into base (dir_name, active) values ("/movies/dccopy", 1); insert into base (dir_name, active) values ("/movies/dc", 1);
insert into media_batch (purchase_date, capacity, blocksize, permanent, speed,
manufacturer, label)
values ('2001-04-21', 336225, 2048, 1, 12,
'Traxdata', 'Traxdata silver 12X Speed 74'),
('2001-04-26', 335100, 2048, 0, 4,
'Arita', 'Arita CD-RW 74H'),
('2002-03-15', 337275, 2048, 1, 0,
'Biltema', 'Biltema 74 23-555'),
('2001-12-24', 335925, 2048, 0, 4,
'TDK', 'TDK CD-RW650'),
('2003-04-14', 336075, 2048, 0, 24,
'Plextor', 'Plextor CD-RW 74'),
('2003-04-14', 359847, 2048, 1, 48,
'Plextor', 'Plextor CD-R 80 48x multispeed');
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment