-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: imported users have importation date instead of registrataion date
- Now registration date is optional (we allow NULL) for imported users. - And imported users have an importation date, which is NULL for registered users throught the sdantadrd registration process.
- Loading branch information
1 parent
21174d4
commit 99edf52
Showing
7 changed files
with
26 additions
and
9 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
migrations/mysql/20221109092556_torrust_user_date_registered_allow_null.sql
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 @@ | ||
ALTER TABLE torrust_users CHANGE date_registered date_registered DATETIME NOT NULL |
1 change: 1 addition & 0 deletions
1
migrations/mysql/20221109095718_torrust_user_add_date_imported.sql
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 @@ | ||
ALTER TABLE torrust_users ADD COLUMN date_imported DATETIME DEFAULT NULL |
11 changes: 11 additions & 0 deletions
11
migrations/sqlite3/20221109092556_torrust_user_date_registered_allow_null.sql
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 @@ | ||
CREATE TABLE IF NOT EXISTS torrust_users_new ( | ||
user_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, | ||
date_registered TEXT DEFAULT NULL, | ||
administrator BOOL NOT NULL DEFAULT FALSE | ||
); | ||
|
||
INSERT INTO torrust_users_new SELECT * FROM torrust_users; | ||
|
||
DROP TABLE torrust_users; | ||
|
||
ALTER TABLE torrust_users_new RENAME TO torrust_users |
1 change: 1 addition & 0 deletions
1
migrations/sqlite3/20221109095718_torrust_user_add_date_imported.sql
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 @@ | ||
ALTER TABLE torrust_users ADD COLUMN date_imported TEXT DEFAULT NULL |
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