-- --------------------------------------------------------

ALTER TABLE library_document_collection ADD COLUMN versionable boolean DEFAULT false;

--
-- Table structure for table `library_document_versions`
--

CREATE TABLE `library_document_versions` (
  `id` int(11) NOT NULL,
  `userId` int(11) NOT NULL,
  `library_document_id` int(11) NOT NULL,
  `library_document_file_id` int(11) NOT NULL,
  `created_at` DATETIME,
  `version` float(5) NOT NULL,
  `note` longtext
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

ALTER TABLE `library_document_versions`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `library_document_versions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

-- --------------------------------------------------------