-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
require "rails/generators/active_record" | ||
|
||
class Disqualified::InstallGenerator < Rails::Generators::Base | ||
include ActiveRecord::Generators::Migration | ||
|
||
source_root File.expand_path("templates", __dir__) | ||
|
||
class_option :database, | ||
type: :string, | ||
aliases: %i[--db], | ||
desc: "The database for your migration. By default, the current environment's primary database is used." | ||
|
||
def copy_migration_file | ||
basename = "20220703062536_create_disqualified_jobs.rb" | ||
copy_file(basename, "db/migrate/#{basename}") | ||
copy_file(basename, File.join(db_migrate_path, basename)) | ||
|
||
basename = "20241119023328_create_disqualified_sequences.rb" | ||
copy_file(basename, "db/migrate/#{basename}") | ||
copy_file(basename, File.join(db_migrate_path, basename)) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
--dir | ||
. | ||
--ignore=lib/generators/disqualified/ | ||
--ignore=vendor/ | ||
--enable-experimental-requires-ancestor |