Merge branch 'main' into colorable-models
This commit is contained in:
commit
f3becdf57b
5 changed files with 17 additions and 5 deletions
|
@ -5,6 +5,7 @@ require "cmd"
|
|||
class Twenty::Command < Cmd
|
||||
##
|
||||
# mixins
|
||||
require_relative "command/mixin/common_option_mixin"
|
||||
require_relative "command/mixin/pending_migration_mixin"
|
||||
require_relative "command/mixin/sqlite_connection_mixin"
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
class Twenty::Command::Console < Twenty::Command
|
||||
set_banner usage: "twenty console [OPTIONS]",
|
||||
description: "Start the twenty developer console"
|
||||
include CommonOptionMixin
|
||||
prepend Twenty::Command::PendingMigrationMixin
|
||||
prepend Twenty::Command::SQLiteConnectionMixin
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
class Twenty::Command::Migrate < Twenty::Command
|
||||
set_banner usage: "twenty migrate [OPTIONS]",
|
||||
description: "Migrate the database"
|
||||
include CommonOptionMixin
|
||||
prepend Twenty::Command::SQLiteConnectionMixin
|
||||
|
||||
def run
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
class Twenty::Command
|
||||
module CommonOptionMixin
|
||||
def self.included(mod)
|
||||
mod.module_eval do
|
||||
set_option "-d PATH",
|
||||
"--database PATH",
|
||||
"The path to an alternate SQLite3 database",
|
||||
as: String,
|
||||
default: nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -3,11 +3,7 @@
|
|||
class Twenty::Command::Up < Twenty::Command
|
||||
set_banner usage: "twenty up [OPTIONS]",
|
||||
description: "Start the twenty web server"
|
||||
set_option "-d PATH",
|
||||
"--database PATH",
|
||||
"The path to an alternate SQLite3 database",
|
||||
as: String,
|
||||
default: nil
|
||||
include CommonOptionMixin
|
||||
prepend Twenty::Command::PendingMigrationMixin
|
||||
prepend Twenty::Command::SQLiteConnectionMixin
|
||||
|
||||
|
|
Loading…
Reference in a new issue