Compare commits

..

2 Commits

6 changed files with 27 additions and 4 deletions

2
.bundle/config Normal file
View File

@ -0,0 +1,2 @@
---
BUNDLE_PATH: "vendor/bundle"

View File

@ -4,4 +4,4 @@ $conf = Config.new(File.join(__dir__, 'config/defaults.yaml'))
root = ::File.dirname(__FILE__) root = ::File.dirname(__FILE__)
require ::File.join( root, 'src', 'server' ) require ::File.join( root, 'src', 'server' )
run GameData.new run Destructo.new

View File

@ -2,5 +2,5 @@ database:
adapter: 'sqlite' adapter: 'sqlite'
database: 'data/destructo.db' database: 'data/destructo.db'
testing: messages:
minimum_results_required: 3 soft_delete: false

View File

@ -0,0 +1,16 @@
Sequel.migration do
up do
create_table(:messages) do
primary_key :id
String :body, null: false
DateTime :created_at, default: Sequel::CURRENT_TIMESTAMP
DateTime :updated_at, default: Sequel::CURRENT_TIMESTAMP
end
end
down do
drop_table(:messages)
end
end

View File

@ -1,3 +1,3 @@
# frozen_string_literal: true # frozen_string_literal: true
# Will add models to load here require_relative 'message'

5
src/models/message.rb Normal file
View File

@ -0,0 +1,5 @@
# frozen_string_literal: true
# Message - database model for messages
class Message < Sequel::Model
end