Merge branch '11917-dont-clear-cache'
[arvados.git] / services / api / Rakefile
index 9d3d8f314c0f72206742dc935c25926acc463b01..fad803cb94501b9deebe5b9c31a1ad3c559e72d1 100644 (file)
@@ -37,10 +37,17 @@ namespace :db do
       require 'tempfile'
       origfnm = File.expand_path('../db/structure.sql', __FILE__)
       tmpfnm = Tempfile.new 'structure.sql', File.expand_path('..', origfnm)
+      copyright_done = false
       begin
         tmpfile = File.new tmpfnm, 'w'
         origfile = File.new origfnm
         origfile.each_line do |line|
+          if !copyright_done
+            if !/Copyright .* Arvados/.match(line)
+               tmpfile.write "-- Copyright (C) The Arvados Authors. All rights reserved.\n--\n-- SPDX-License-Identifier: AGPL-3.0\n\n"
+            end
+            copyright_done = true
+          end
           if /^SET lock_timeout = 0;/ =~ line
             # Avoid edit wars between versions that do/don't write this line.
             next