Fixes missing files
This commit is contained in:
parent
0b8b717f3e
commit
8c5de206e1
10 changed files with 27259 additions and 6 deletions
21
web/App_Data/Sql/profiles_insertions.sql
Normal file
21
web/App_Data/Sql/profiles_insertions.sql
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
INSERT INTO profiles (username,applicationname,isanonymous,lastactivitydate,lastupdateddate)
|
||||
SELECT users.username , users.applicationname, FALSE,
|
||||
users.lastactivitydate, now()
|
||||
FROM users LEFT OUTER JOIN profiles ON (users.username = profiles.username
|
||||
AND users.applicationname = profiles.applicationname)
|
||||
where profiles.username IS NULL;
|
||||
|
||||
ALTER TABLE users
|
||||
ADD FOREIGN KEY (applicationname, username)
|
||||
REFERENCES profiles (applicationname, username) ON UPDATE CASCADE ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE profiles
|
||||
DROP CONSTRAINT fk_profileusers;
|
||||
|
||||
update profiles SET isanonymous = FALSE where isanonymous IS NULL;
|
||||
|
||||
ALTER TABLE profiles
|
||||
ALTER COLUMN isanonymous SET DEFAULT TRUE;
|
||||
ALTER TABLE profiles
|
||||
ALTER COLUMN isanonymous SET NOT NULL;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue