ImEgg
ImEgg
Explore posts from servers
PPrisma
Created by ImEgg on 10/28/2024 in #help-and-questions
Mongodb, Making Breaking changes to production database
I see. According to documentation, the strategy I am referring to would be "all-at-once" updates. From what it sounds like, the best way to go about this is to have the script run in your CI/CD pipeline. if it fails, the push fails and that for every breaking change, there should be 2 separate migrations. the first one adds and moves data to new field. once we do checks and balances and are okay with results we make the second migration to remove old field / data if need be. Please correct me if I'm wrong here. 2nd question. For Prisma with SQL, there is a migration folder and migrations tracker table in the db itself. Is the recommended idea to try and mimic this solution for mongodb if the idea is to do "all-at-once" updates similar to it. Thank you for your help. I appreciate it!
6 replies
TTCTheo's Typesafe Cult
Created by benten on 2/29/2024 in #questions
Using Svelte with Next.js
what the fuck did I just read
25 replies
TTCTheo's Typesafe Cult
Created by ImEgg on 2/23/2024 in #questions
Integration Testing for APIs that interact with a Third-Party System
- my other thought is that I don't even know how it would be possible to unit test everything considering how dependent my API is on this external system (but again, I'm probably doing something wrong) and the whole existing in isolation thing if that's only a unit test thing.
4 replies
TTCTheo's Typesafe Cult
Created by ImEgg on 2/23/2024 in #questions
Integration Testing for APIs that interact with a Third-Party System
- Mocking data. From my understanding it is generally regarded as bad practice to implement "mock data" from an API service. So, in my case where all my data is being delivered from a Third-Party System and that's all my API is listening for. doing things this way requires me to not only mock the Webhook request data letting me there was an update but also mock the data from the API request I make right after. - if I try to go about not mocking data, my Integration tests have to use the API in order to set up conditions so that a test can run. (but these set up conditions are never used in my API itself only in the tests) - for example, lets say my test is to get a project and all data associated with that project from the external system. the set up condition would be that a project needs to be created inside that external system. - in my scenario here, I am never needing to "create a project" in the external system from with in my API. - is this okay to do? - to add, there might be 15 different "fields" that go into every project that need to also be tested. which would mean that for those instances I would need to create those for the events that update the project. It seems like a "heavy" set up process with an external API service where I'm only using these creation endpoints for testing? It seems like I'm creating more of a headache than I am preventing them. so maybe I'm going about this the wrong way? - Most things in this external system require everything to be associated to a project (as which I have mimicked in my database design) - so a "note" object cannot exist without a project. how am I supposed to adhere to this in tests where everything is supposed to exist in isolation? or is that not a concern for integration tests?
4 replies
TTCTheo's Typesafe Cult
Created by Boris Povolotsky on 2/22/2024 in #questions
help with DB schema
https://www.studytonight.com/dbms/database-normalization.php I would say if you can get your database to be at the 3rd Form of normalization, you'll be just fine. "over-engineering" is a pretty weird term to use. I'd try to focus more on best-practices and why normalization is important and other basics of SQL database design. Tons of resources online to learn.
2 replies
TTCTheo's Typesafe Cult
Created by jz on 11/26/2023 in #questions
User event logging solution with T3 stack?
you could also use fullstory, they have a pretty interesting view into frontend view of what users are doing though, I've never used it before
6 replies
TTCTheo's Typesafe Cult
Created by jz on 11/26/2023 in #questions
User event logging solution with T3 stack?
there's stuff like amplitude and segment + mixpanel as well to generate analytics from user events. all of these options have pretty generous free-tiers, amplitude is alright but I think segment and/or mix panel together is better
6 replies