mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
feat(db): properties_contents.placed_by, the character who placed a model
NULL is the owner (every model placed before this, and dashboard imports). Read by GetPropertyModels and GetModel, written by InsertNewPropertyModel on MySQL and SQLite, with a parity test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
/* properties_contents.placed_by is the character who placed the model (NULL: the property's owner, and every model
|
||||
placed before this column). A model picked up by another player who can build there goes back to them. */
|
||||
SET @dlu_column = (SELECT IF(COUNT(*) = 0, 'ALTER TABLE properties_contents ADD COLUMN placed_by BIGINT NULL DEFAULT NULL', 'DO 0') FROM information_schema.columns
|
||||
WHERE table_schema = DATABASE() AND table_name = 'properties_contents' AND column_name = 'placed_by');
|
||||
PREPARE dlu_column_stmt FROM @dlu_column;
|
||||
EXECUTE dlu_column_stmt;
|
||||
DEALLOCATE PREPARE dlu_column_stmt;
|
||||
@@ -0,0 +1,2 @@
|
||||
/* The character who placed a property model (NULL: the owner). See the MySQL migration. */
|
||||
ALTER TABLE properties_contents ADD COLUMN placed_by BIGINT DEFAULT NULL;
|
||||
Reference in New Issue
Block a user