Skip to content

Commit e46940e

Browse files
committed
chore: normalize line endings in database migrations
- Fix line endings in all migration files - Ensure consistent formatting across migrations - No functional changes to database schema
1 parent 72720f8 commit e46940e

13 files changed

Lines changed: 476 additions & 491 deletions
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
class EnableUuidExtension < ActiveRecord::Migration[7.1]
2-
def change
3-
enable_extension 'pgcrypto'
4-
end
1+
class EnableUuidExtension < ActiveRecord::Migration[7.1]
2+
def change
3+
enable_extension 'pgcrypto'
4+
end
55
end
Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
class CreateOrganizations < ActiveRecord::Migration[7.1]
2-
def change
3-
create_table :organizations, id: :uuid do |t|
4-
t.string :name, null: false
5-
t.string :slug, null: false
6-
t.string :region, null: false
7-
t.string :tier
8-
t.string :subscription_plan
9-
t.string :subscription_status
10-
t.string :logo_url
11-
t.jsonb :settings, default: {}
12-
13-
t.timestamps
14-
end
15-
16-
add_index :organizations, :slug, unique: true
17-
add_index :organizations, :region
18-
add_index :organizations, :subscription_plan
19-
end
1+
class CreateOrganizations < ActiveRecord::Migration[7.1]
2+
def change
3+
create_table :organizations, id: :uuid do |t|
4+
t.string :name, null: false
5+
t.string :slug, null: false
6+
t.string :region, null: false
7+
t.string :tier
8+
t.string :subscription_plan
9+
t.string :subscription_status
10+
t.string :logo_url
11+
t.jsonb :settings, default: {}
12+
13+
t.timestamps
14+
end
15+
16+
add_index :organizations, :slug, unique: true
17+
add_index :organizations, :region
18+
add_index :organizations, :subscription_plan
19+
end
2020
end
Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
class CreateUsers < ActiveRecord::Migration[7.1]
2-
def change
3-
create_table :users, id: :uuid do |t|
4-
t.references :organization, null: false, foreign_key: true, type: :uuid
5-
t.string :email, null: false
6-
t.string :password_digest, null: false
7-
t.string :full_name
8-
t.string :role, null: false
9-
t.string :avatar_url
10-
t.string :timezone
11-
t.string :language
12-
t.boolean :notifications_enabled, default: true
13-
t.jsonb :notification_preferences, default: {}
14-
t.timestamp :last_login_at
15-
16-
t.timestamps
17-
end
18-
19-
add_index :users, :organization_id
20-
add_index :users, :email, unique: true
21-
add_index :users, :role
22-
end
1+
class CreateUsers < ActiveRecord::Migration[7.1]
2+
def change
3+
create_table :users, id: :uuid do |t|
4+
t.references :organization, null: false, foreign_key: true, type: :uuid
5+
t.string :email, null: false
6+
t.string :password_digest, null: false
7+
t.string :full_name
8+
t.string :role, null: false
9+
t.string :avatar_url
10+
t.string :timezone
11+
t.string :language
12+
t.boolean :notifications_enabled, default: true
13+
t.jsonb :notification_preferences, default: {}
14+
t.timestamp :last_login_at
15+
16+
t.timestamps
17+
end
18+
19+
add_index :users, :email, unique: true
20+
add_index :users, :role
21+
end
2322
end
Lines changed: 58 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,59 @@
1-
class CreatePlayers < ActiveRecord::Migration[7.1]
2-
def change
3-
create_table :players, id: :uuid do |t|
4-
t.references :organization, null: false, foreign_key: true, type: :uuid
5-
t.string :summoner_name, null: false
6-
t.string :real_name
7-
t.string :role, null: false
8-
t.string :country
9-
t.date :birth_date
10-
t.string :status, default: 'active'
11-
12-
# Riot Games Data
13-
t.string :riot_puuid
14-
t.string :riot_summoner_id
15-
t.string :riot_account_id
16-
t.integer :profile_icon_id
17-
t.integer :summoner_level
18-
19-
# Ranked Data
20-
t.string :solo_queue_tier
21-
t.string :solo_queue_rank
22-
t.integer :solo_queue_lp
23-
t.integer :solo_queue_wins
24-
t.integer :solo_queue_losses
25-
t.string :flex_queue_tier
26-
t.string :flex_queue_rank
27-
t.integer :flex_queue_lp
28-
t.string :peak_tier
29-
t.string :peak_rank
30-
t.string :peak_season
31-
32-
# Contract Info
33-
t.date :contract_start_date
34-
t.date :contract_end_date
35-
t.decimal :salary, precision: 10, scale: 2
36-
t.integer :jersey_number
37-
38-
# Additional Info
39-
t.text :champion_pool, array: true, default: []
40-
t.string :preferred_role_secondary
41-
t.text :playstyle_tags, array: true, default: []
42-
t.string :twitter_handle
43-
t.string :twitch_channel
44-
t.string :instagram_handle
45-
t.text :notes
46-
47-
# Metadata
48-
t.jsonb :metadata, default: {}
49-
t.timestamp :last_sync_at
50-
51-
t.timestamps
52-
end
53-
54-
add_index :players, :organization_id
55-
add_index :players, :riot_puuid, unique: true
56-
add_index :players, :summoner_name
57-
add_index :players, :status
58-
add_index :players, :role
59-
end
1+
class CreatePlayers < ActiveRecord::Migration[7.1]
2+
def change
3+
create_table :players, id: :uuid do |t|
4+
t.references :organization, null: false, foreign_key: true, type: :uuid
5+
t.string :summoner_name, null: false
6+
t.string :real_name
7+
t.string :role, null: false
8+
t.string :country
9+
t.date :birth_date
10+
t.string :status, default: 'active'
11+
12+
# Riot Games Data
13+
t.string :riot_puuid
14+
t.string :riot_summoner_id
15+
t.string :riot_account_id
16+
t.integer :profile_icon_id
17+
t.integer :summoner_level
18+
19+
# Ranked Data
20+
t.string :solo_queue_tier
21+
t.string :solo_queue_rank
22+
t.integer :solo_queue_lp
23+
t.integer :solo_queue_wins
24+
t.integer :solo_queue_losses
25+
t.string :flex_queue_tier
26+
t.string :flex_queue_rank
27+
t.integer :flex_queue_lp
28+
t.string :peak_tier
29+
t.string :peak_rank
30+
t.string :peak_season
31+
32+
# Contract Info
33+
t.date :contract_start_date
34+
t.date :contract_end_date
35+
t.decimal :salary, precision: 10, scale: 2
36+
t.integer :jersey_number
37+
38+
# Additional Info
39+
t.text :champion_pool, array: true, default: []
40+
t.string :preferred_role_secondary
41+
t.text :playstyle_tags, array: true, default: []
42+
t.string :twitter_handle
43+
t.string :twitch_channel
44+
t.string :instagram_handle
45+
t.text :notes
46+
47+
# Metadata
48+
t.jsonb :metadata, default: {}
49+
t.timestamp :last_sync_at
50+
51+
t.timestamps
52+
end
53+
54+
add_index :players, :riot_puuid, unique: true
55+
add_index :players, :summoner_name
56+
add_index :players, :status
57+
add_index :players, :role
58+
end
6059
end
Lines changed: 52 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,53 @@
1-
class CreateMatches < ActiveRecord::Migration[7.1]
2-
def change
3-
create_table :matches, id: :uuid do |t|
4-
t.references :organization, null: false, foreign_key: true, type: :uuid
5-
t.string :match_type, null: false
6-
t.string :riot_match_id
7-
8-
# Game Info
9-
t.string :game_version
10-
t.timestamp :game_start
11-
t.timestamp :game_end
12-
t.integer :game_duration
13-
14-
# Teams
15-
t.string :our_side
16-
t.string :opponent_name
17-
t.string :opponent_tag
18-
t.boolean :victory
19-
20-
# Scores
21-
t.integer :our_score
22-
t.integer :opponent_score
23-
t.integer :our_towers
24-
t.integer :opponent_towers
25-
t.integer :our_dragons
26-
t.integer :opponent_dragons
27-
t.integer :our_barons
28-
t.integer :opponent_barons
29-
t.integer :our_inhibitors
30-
t.integer :opponent_inhibitors
31-
32-
# Bans
33-
t.text :our_bans, array: true, default: []
34-
t.text :opponent_bans, array: true, default: []
35-
36-
# Files
37-
t.string :vod_url
38-
t.string :replay_file_url
39-
40-
# Organization
41-
t.text :tags, array: true, default: []
42-
t.text :notes
43-
t.jsonb :metadata, default: {}
44-
45-
t.timestamps
46-
end
47-
48-
add_index :matches, :organization_id
49-
add_index :matches, :riot_match_id, unique: true
50-
add_index :matches, :match_type
51-
add_index :matches, :game_start
52-
add_index :matches, :victory
53-
end
1+
class CreateMatches < ActiveRecord::Migration[7.1]
2+
def change
3+
create_table :matches, id: :uuid do |t|
4+
t.references :organization, null: false, foreign_key: true, type: :uuid
5+
t.string :match_type, null: false
6+
t.string :riot_match_id
7+
8+
# Game Info
9+
t.string :game_version
10+
t.timestamp :game_start
11+
t.timestamp :game_end
12+
t.integer :game_duration
13+
14+
# Teams
15+
t.string :our_side
16+
t.string :opponent_name
17+
t.string :opponent_tag
18+
t.boolean :victory
19+
20+
# Scores
21+
t.integer :our_score
22+
t.integer :opponent_score
23+
t.integer :our_towers
24+
t.integer :opponent_towers
25+
t.integer :our_dragons
26+
t.integer :opponent_dragons
27+
t.integer :our_barons
28+
t.integer :opponent_barons
29+
t.integer :our_inhibitors
30+
t.integer :opponent_inhibitors
31+
32+
# Bans
33+
t.text :our_bans, array: true, default: []
34+
t.text :opponent_bans, array: true, default: []
35+
36+
# Files
37+
t.string :vod_url
38+
t.string :replay_file_url
39+
40+
# Organization
41+
t.text :tags, array: true, default: []
42+
t.text :notes
43+
t.jsonb :metadata, default: {}
44+
45+
t.timestamps
46+
end
47+
48+
add_index :matches, :riot_match_id, unique: true
49+
add_index :matches, :match_type
50+
add_index :matches, :game_start
51+
add_index :matches, :victory
52+
end
5453
end

0 commit comments

Comments
 (0)