mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
- Adds the framework that allows soft-deleting books from the library.
This commit is contained in:
15
SQL/database_changelog.txt
Normal file
15
SQL/database_changelog.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
4 November 2013, by Errorage
|
||||
|
||||
The column 'deleted' was added to the erro_library table. If set to anything other than null, the book is interpreted as deleted.
|
||||
|
||||
To update your database, execute the following code in phpmyadmin, mysql workbench or whatever program you use:
|
||||
|
||||
ALTER TABLE erro_library ADD COLUMN deleted TINYINT(1) NULL DEFAULT NULL AFTER datetime;
|
||||
|
||||
If you want to 'soft delete' a book (meaning it remains in the library, but isn't viewable by players), set the value in the 'deleted' column for the row to 1. To undelete, set it back to null. If you're making an admin tool to work with this, execute the following SQL statement to soft-delete the book with id someid:
|
||||
|
||||
UPDATE erro_library SET deleted = 1 WHERE id = someid
|
||||
|
||||
(Replace someid with the id of the book you want to soft delete.)
|
||||
|
||||
----------------------------------------------------
|
||||
@@ -174,6 +174,7 @@ CREATE TABLE `erro_library` (
|
||||
`category` varchar(45) NOT NULL,
|
||||
`ckey` varchar(45) DEFAULT 'LEGACY',
|
||||
`datetime` datetime DEFAULT NULL,
|
||||
`deleted` tinyint(1) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user