columns necessary for SIWE linear task
Details
- Reviewers
atul varun tomek - Commits
- rCOMM6df5a6495bc9: [keyserver/sql] add SIWE columns
run keyserver, verify columns are in table with tableplus
Diff Detail
- Repository
- rCOMM Comm
- Branch
- derek/keyserver
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
ashoat's instructions here were to update setup-db.js *and* add a migration - correct me if i'm wrong, my understanding is if we modified setup-db.js we wouldn't need to add a migration
my understanding is if we modified setup-db.js we wouldn't need to add a migration
That understanding is wrong, setup-db.js only runs if there is no database.
@ashoat got it, i forgot that we're implicitly planning many new dbs to be created, as opposed to running migrations on a live sql instance.
also, i was extrapolating from postgres: my assumption was setup-db.js was effectively the OG schema that you see when you dump the db, & if you modified that OG record all following migrations would be corrupted.
i forgot that we're implicitly planning many new dbs to be created
also for updating developer local environment
keyserver/src/database/migration-config.js | ||
---|---|---|
46 | Why do we use mediumtext type? What are the requirements for the content of this field? | |
keyserver/src/database/setup-db.js | ||
36–38 | Do every row will have these values? Probably not and that would mean that adding these values to the table denormalizes the model. Ideally, we should have a separate table and a foreign key to that table, but it doesn't matter too much in this case and keeping this approach might be more cost effective. So let's keep it as it is simpler. |
keyserver/src/database/migration-config.js | ||
---|---|---|
46 | linear task for context the goal is to use a key pair when authenticating for a social proof. i made it medium text because i was unsure of how long it would be. changed it to varchar(255) | |
keyserver/src/database/setup-db.js | ||
36–38 | this task may add additional context/clarity around denormalization, but maybe we need to think more in depth about a separate table? |
keyserver/src/database/migration-config.js | ||
---|---|---|
46 | We should investigate this a bit and determine what the expected length would be. It would be easier to have the right value from the beginning so that we don't need to update the type later. |