added library_file_spec, unique index and foreign key constraint