Sha256: 4f04c9218976a866bd7ce66d943f740e71311cbd2ce858ba1c52dbfc86b446c2
Contents?: true
Size: 545 Bytes
Versions: 1
Compression:
Stored size: 545 Bytes
Contents
class CreateCurrent<%= @data[:classname_downcase] %> < ActiveRecord::Migration def self.up execute <<-SQL CREATE VIEW current<%= @data[:plural] %> AS SELECT id as org_id, <% @data[:ary].each do |x| %> <%= x.name %>, <% end %> start_datetime FROM <%= @data[:plural] %> where not exists (select * from invalid<%= @data[:plural] %> where invalid<%= @data[:plural] %>.org_id = <%= @data[:plural] %>.id ) SQL end def self.down execute <<-SQL DROP VIEW current<%= @data[:plural] %> SQL end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
arxutils-0.1.31 | lib/template/current.tmpl |