-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #828 from pooza/3_1_0
3.1.0
- Loading branch information
Showing
16 changed files
with
160 additions
and
614 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
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Sequel.migration do | ||
transaction | ||
up do | ||
create_table(:account, ignore_index_errors: true) do | ||
primary_key :id | ||
String :acct, size: 64, null: false | ||
Integer :favorability, default: 0, null: false | ||
String :nickname, size: 64 | ||
|
||
index [:acct], name: :account_acct_key, unique: true | ||
end | ||
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Sequel.migration do | ||
transaction | ||
up do | ||
create_table(:fairy, ignore_index_errors: true) do | ||
primary_key :id | ||
String :name, text: true, null: false | ||
String :human_name, text: true | ||
String :suffix, text: true | ||
|
||
index [:name], name: :fairy_name_key, unique: true | ||
end | ||
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Sequel.migration do | ||
transaction | ||
up do | ||
create_table(:form, ignore_index_errors: true) do | ||
primary_key :id | ||
String :name, size: 64, null: false | ||
|
||
index [:name], name: :form_name_idx, unique: true | ||
end | ||
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Sequel.migration do | ||
transaction | ||
up do | ||
create_table(:keyword, ignore_index_errors: true) do | ||
primary_key :id | ||
String :type, size: 64 | ||
String :word, size: 64 | ||
|
||
index [:type, :word], name: :keyword_type_word_idx, unique: true | ||
end | ||
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Sequel.migration do | ||
transaction | ||
up do | ||
create_table(:message, ignore_index_errors: true) do | ||
primary_key :id | ||
String :type, size: 64, null: false | ||
String :feature, size: 64 | ||
String :message, text: true, null: false | ||
Integer :month | ||
Integer :day | ||
String :data | ||
|
||
index [:feature], name: :message_feature_idx | ||
index [:type], name: :message_type_idx | ||
end | ||
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Sequel.migration do | ||
transaction | ||
up do | ||
create_table(:series, ignore_index_errors: true) do | ||
primary_key :id | ||
String :name, size: 256, null: false | ||
|
||
index [:name], name: :series_name_idx, unique: true | ||
end | ||
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Sequel.migration do | ||
transaction | ||
up do | ||
create_table(:track, ignore_index_errors: true) do | ||
primary_key :id | ||
String :title, text: true | ||
String :url, text: true | ||
TrueClass :makoto, default: false, null: false | ||
String :intro, text: true | ||
|
||
index [:url], name: :track_url_idx, unique: true | ||
end | ||
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Sequel.migration do | ||
transaction | ||
up do | ||
create_table(:past_keyword) do | ||
primary_key :id | ||
foreign_key :account_id, :account, null: false, key: [:id], on_delete: :cascade | ||
DateTime :created_at, null: false | ||
String :surface, size: 64, null: false | ||
String :feature, size: 16 | ||
end | ||
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Sequel.migration do | ||
transaction | ||
up do | ||
create_table(:quote) do | ||
primary_key :id | ||
foreign_key :series_id, :series, null: false, key: [:id], on_delete: :cascade | ||
foreign_key :form_id, :form, null: false, key: [:id], on_delete: :cascade | ||
Integer :episode | ||
String :emotion, size: 16 | ||
TrueClass :exclude, default: false, null: false | ||
TrueClass :exclude_respond, default: false, null: false | ||
Integer :priority, null: false | ||
String :body, text: true, null: false | ||
String :remark, text: true | ||
end | ||
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
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module Makoto | ||
extend Rake::DSL | ||
|
||
namespace :migration do | ||
desc 'migrate database' | ||
task :run do | ||
path = File.join(Environment.dir, 'app/migration') | ||
sh "bundle exec sequel -m #{path} '#{Postgres.dsn}' -E" | ||
end | ||
end | ||
|
||
desc 'alias of migration:run' | ||
task migrate: ['migration:run'] | ||
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
Oops, something went wrong.