Sha256: b6ac55ed1ca41a61620b4989d3306c728ec2d7dea830b404661989322772226b
Contents?: true
Size: 543 Bytes
Versions: 15
Compression:
Stored size: 543 Bytes
Contents
# frozen_string_literal: true module Tractive class Wiki < Sequel::Model(:wiki) set_primary_key :name one_to_many :attachments, class: Attachment, key: :id, conditions: { type: "wiki" } dataset_module do def for_migration select(:name, :version, :author, :comment, Sequel.lit("datetime(time/1000000, 'unixepoch')").as(:fixeddate), :text).order(:name, :version) end def latest_versions select(:name, :version, :text).group(:name).having { version =~ MAX(version) } end end end end
Version data entries
15 entries across 15 versions & 1 rubygems