diff --git a/migrations/README.md b/migrations/README.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/migrations/common/.gitkeep b/migrations/common/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/migrations/convert b/migrations/convert new file mode 100755 index 00000000000..1991ec67b38 --- /dev/null +++ b/migrations/convert @@ -0,0 +1,2 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true diff --git a/migrations/converters/.gitkeep b/migrations/converters/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/migrations/docs/.gitkeep b/migrations/docs/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/migrations/import b/migrations/import new file mode 100755 index 00000000000..d6fa7662439 --- /dev/null +++ b/migrations/import @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +puts "Loading application..." +require_relative "../config/environment" + +module Migrations + module Import + class << self + def run + puts "Importing into Discourse #{Discourse::VERSION::STRING}" + end + end + end +end + +Migrations::Import.run diff --git a/migrations/importer/.gitkeep b/migrations/importer/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/migrations/importer/steps/.gitkeep b/migrations/importer/steps/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/migrations/spec/.gitkeep b/migrations/spec/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/migrations/spec/import_spec.rb b/migrations/spec/import_spec.rb new file mode 100644 index 00000000000..683b2d32d0c --- /dev/null +++ b/migrations/spec/import_spec.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +RSpec.describe "Migrations::Import" do + subject(:cli) { system "migrations/import" } + + it "works" do + expect { cli }.to output( + include("Importing into Discourse #{Discourse::VERSION::STRING}"), + ).to_stdout_from_any_process + end +end