January 12, 2025 at 11:28 pm
At work I am rewriting an old application which no longer builds. It was poorly written to begin with. The original developers, who wrote it about 15 years ago, didn't follow any convention that was used at the time. They created a database to collect data and added one table to handled identity. All users of the application are in that one table. The managers for that department add new users to this table, creating new primary keys for each person they add and adding their work email address and a few other data items from work. I don't know how they decide what is a good primary key as they've never told me how they prevent collisions, and the original developers didn't bother to document anything. It works, or at least the managers have gotten used to whatever process they use.
I have started rewriting the application using the Blazor technology with individual accounts. The identity technology that has been around for as long as the old app was written, but like I said the original developers didn't bother to use any convention or common practice at the time. Anyway, when I started the new, application rewrite the project templates creates a LocalDb database with half a dozen tables, for identity, roles, etc. (A quick aside, I have looked for months to find a way to use Active Directory with Blazor. In every tutorial, training, documentation, etc. I have not been able to find any example, of doing that. Every tutorial, documentation, training, etc. has always and only used the identity technology that Microsoft has done for decades. So, after so much time looking for a way of doing it and not being able to find one, I've decided I've wasted enough time and will use SQL Server table identity instead.)
So, now I have two databases to deal with. One, the original database designed by people who ignored convention used at the time and is at this point only used by the original application. And the new Blazor application I've been working on, which only has the LocalDb for identity.
My problem is I've got to make the new application work with the old database, and I've decided also work with that single table the original developers wrote, for identity, but also use at least the tables for identity from the LocalDb. What is an approach I should use to get these together? Would it be better to migrate the tables that creating the Blazor application created in the LocalDb, into a regular SQL Server database? If I do that, then wouldn't it be better to migrate those tables into the old database?
Rod
January 13, 2025 at 2:30 pm
Hey Rod,
I do not have a good answer.
Probably, especially considering we're talking security, you'd be better off migrating out of the existing thing, whether it works or not. However, I recognize that I just added a ton of work and testing and pain to your life by saying that. But, that's where my head goes. I'm not sure it's a good answer, just the one I've got.
Plus, I didn't want you to think that no one was looking through your question.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply