Open freestylecoder opened 7 years ago
Hmm. Thinking about giving this the old college try.
I know you're way over-burdened right now, but I'd be curious to know if you have a way for me to seed my local database with enough data to test this and/or other features. Perhaps an INSERT
query or two?
Not sure if @freestylecoder uses the SQLite / SQL Server Compact Toolbox
extension or not. If he does then he could easily give you a insert script of with data from production to test with. I've used it multiple times with great success.
Hold off on this until a little later tonight. I have a change in the pipeline that will make this MUCH easier to replicate / test.
w00 h00!
Ok, my changes just went live. This script on your local DB should get you testing, or at least get you close...
BEGIN TRANSACTION
DECLARE @UserID INTEGER;
DECLARE @PastTSID INTEGER;
DECLARE @FutureTSID INTEGER;
INSERT TimeSlots ( StartTime, EndTime ) VALUES ( DATEADD( d, -2, GETUTCDATE() ), DATEADD( d, -1, GETUTCDATE() ) );
SET @PastTSID = SCOPE_IDENTITY();
INSERT TimeSlots ( StartTime, EndTime ) VALUES ( DATEADD( y, 1, GETUTCDATE() ), DATEADD( y, 2, GETUTCDATE() ) );
SET @FutureTSID = SCOPE_IDENTITY();
INSERT Users ( EmailAddress, DisplayName, PasswordHash, Bio, Twitter, Website, Permissions, SessionToken, SessionExpires ) VALUES
( 'test@test.com', 'Test User', NULL, 'Test Bio', NULL, NULL, 1, NULL, NULL );
SET @UserID = SCOPE_IDENTITY();
INSERT Sessions ( UserId, Title, Abstract, Notes, Accepted, TimeSlotId, RoomId, SessionLength ) VALUES
( @UserID, 'Test Old Session', 'Test Old Abstract', 'Test Old Notes', 1, @PastTSID, NULL, 60 ),
( @UserID, 'Test New Session', 'Test New Abstract', 'Test New Notes', 1, @FutureTSID, NULL, 60 );
COMMIT TRANSACTION
I should really take a look at this...
Actually, is this still relevant?
It's still relevant, in the fact that what I did was a hack.
The speaker details pages for individual speakers shows sessions from all years.
This is not necessarily bad, but we should, at least, separate the active sessions from the past sessions.