Remove browsing selection ceilings
This commit is contained in:
1 parent
c028637556
commit
bc42c55555
14 files changed
+81
-53
No files matched your search
@@ -12,7 +12,7 @@ const OTHER_ACCOUNT = '@t2_other:reddit.com';
|
||||
/** Migrations that make up account growth, replayed together in the upgrade test. */
|
||||
// Browsing migrations depend on the growth tables, so a pre-growth fixture
|
||||
// must rewind past both the growth sequence and the later browsing additions.
|
||||
const GROWTH_MIGRATION_COUNT = 6;
|
||||
const GROWTH_MIGRATION_COUNT = 7;
|
||||
|
||||
function thread(id: string, overrides: Partial<RedditPost> = {}): RedditPost {
|
||||
return {
|
||||
@@ -538,9 +538,9 @@ describe('growth migration', () => {
|
||||
runMigrations(db);
|
||||
const version = db.pragma('user_version', { simple: true }) as number;
|
||||
db.exec('ALTER TABLE account_growth_settings DROP COLUMN daily_limit');
|
||||
// Browsing simulation is the migration after the growth daily-limit
|
||||
// column, so rewind both to replay the real upgrade sequence.
|
||||
db.pragma(`user_version = ${version - 2}`);
|
||||
// Rewind the daily-limit migration and every browsing migration that now
|
||||
// follows it so the upgrade replays against the old growth row shape.
|
||||
db.pragma(`user_version = ${version - 6}`);
|
||||
insertAccount(db, ACCOUNT);
|
||||
// Seed a row with the old shape so the upgrade runs against real data.
|
||||
db.prepare(`
|
||||
|
||||
Reference in new issue
Block a user