Open IAPark opened 8 years ago
So, Civcraft isn't the only server running this plugin, and some might wind up trying to update against live data.
Any changes we make need to at least offer a smooth migration path.
That said, adding a unique constraint post-fact is possible, although tends to be messy for live data. I'll mark this for future consideration :).
I think it would only create the table if it doesn't already exist so not that big of a deal for other people updating.
Good point. My thinking was more that we'd add it as a migration, not to the initial DB craft. If code depends on the uniqueness but we don't enforce it for migrations we create new liabilities for operators.
Something else that may be worth considering especially as we're creating a new DB is setting loc_x, loc_y, loc_z, loc_world here to be unique. This would prevent any possible errors resulting in Bastions getting doubled up, might even be worth making it the primary key, but I feel like that's a larger change than we really want to do.