Normalize line endings

This commit is contained in:
gsemaj 2021-04-30 04:17:34 -04:00
parent c240cc005f
commit 1c3e1d83de
3 changed files with 65 additions and 65 deletions

View File

@ -1,23 +1,23 @@
# top-most EditorConfig file # top-most EditorConfig file
root = true root = true
# Unix-style newlines with a newline ending every file # Unix-style newlines with a newline ending every file
[*] [*]
end_of_line = lf end_of_line = lf
insert_final_newline = true insert_final_newline = true
# 4 space indentation # 4 space indentation
[*.cpp,*.hpp] [*.cpp,*.hpp]
indent_style = space indent_style = space
indent_size = 4 indent_size = 4
# Tabs in makefile # Tabs in makefile
[Makefile] [Makefile]
indent_style = tab indent_style = tab
# Don't enforce anything in vendored code # Don't enforce anything in vendored code
[/vendor/**] [/vendor/**]
end_of_line = unset end_of_line = unset
insert_final_newline = unset insert_final_newline = unset
indent_style = unset indent_style = unset
indent_style = unset indent_style = unset

10
.gitattributes vendored
View File

@ -1,5 +1,5 @@
vendor/* linguist-vendored vendor/* linguist-vendored
# Always checkout source with LF line endings # Always checkout source with LF line endings
src/*.c text eol=lf src/*.c text eol=lf
src/*.h text eol=lf src/*.h text eol=lf

View File

@ -1,37 +1,37 @@
/* /*
It is recommended in the SQLite manual to turn off It is recommended in the SQLite manual to turn off
foreign keys when making schema changes that involve them foreign keys when making schema changes that involve them
*/ */
PRAGMA foreign_keys=OFF; PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION; BEGIN TRANSACTION;
-- New table to store code items -- New table to store code items
CREATE TABLE RedeemedCodes( CREATE TABLE RedeemedCodes(
PlayerID INTEGER NOT NULL, PlayerID INTEGER NOT NULL,
Code TEXT NOT NULL, Code TEXT NOT NULL,
FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE, FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE,
UNIQUE (PlayerID, Code) UNIQUE (PlayerID, Code)
); );
-- Change Coordinates in Players table to non-plural form -- Change Coordinates in Players table to non-plural form
ALTER TABLE Players RENAME COLUMN XCoordinates TO XCoordinate; ALTER TABLE Players RENAME COLUMN XCoordinates TO XCoordinate;
ALTER TABLE Players RENAME COLUMN YCoordinates TO YCoordinate; ALTER TABLE Players RENAME COLUMN YCoordinates TO YCoordinate;
ALTER TABLE Players RENAME COLUMN ZCoordinates TO ZCoordinate; ALTER TABLE Players RENAME COLUMN ZCoordinates TO ZCoordinate;
-- Fix email attachments not being unique enough -- Fix email attachments not being unique enough
CREATE TABLE Temp ( CREATE TABLE Temp (
PlayerID INTEGER NOT NULL, PlayerID INTEGER NOT NULL,
MsgIndex INTEGER NOT NULL, MsgIndex INTEGER NOT NULL,
Slot INTEGER NOT NULL, Slot INTEGER NOT NULL,
ID INTEGER NOT NULL, ID INTEGER NOT NULL,
Type INTEGER NOT NULL, Type INTEGER NOT NULL,
Opt INTEGER NOT NULL, Opt INTEGER NOT NULL,
TimeLimit INTEGER NOT NULL, TimeLimit INTEGER NOT NULL,
FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE, FOREIGN KEY(PlayerID) REFERENCES Players(PlayerID) ON DELETE CASCADE,
UNIQUE (PlayerID, MsgIndex, Slot) UNIQUE (PlayerID, MsgIndex, Slot)
); );
INSERT INTO Temp SELECT * FROM EmailItems; INSERT INTO Temp SELECT * FROM EmailItems;
DROP TABLE EmailItems; DROP TABLE EmailItems;
ALTER TABLE Temp RENAME TO EmailItems; ALTER TABLE Temp RENAME TO EmailItems;
-- Update DB Version -- Update DB Version
UPDATE Meta SET Value = 3 WHERE Key = 'DatabaseVersion'; UPDATE Meta SET Value = 3 WHERE Key = 'DatabaseVersion';
UPDATE Meta SET Value = strftime('%s', 'now') WHERE Key = 'LastMigration'; UPDATE Meta SET Value = strftime('%s', 'now') WHERE Key = 'LastMigration';
COMMIT; COMMIT;
PRAGMA foreign_keys=ON; PRAGMA foreign_keys=ON;