2018-10-28 09:10:56 +01:00
|
|
|
/*
|
|
|
|
* This file is part of Player Analytics (Plan).
|
|
|
|
*
|
|
|
|
* Plan is free software: you can redistribute it and/or modify
|
2018-11-11 19:55:11 +01:00
|
|
|
* it under the terms of the GNU Lesser General Public License v3 as published by
|
2018-10-28 09:10:56 +01:00
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* Plan is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2018-11-11 19:55:11 +01:00
|
|
|
* GNU Lesser General Public License for more details.
|
2018-10-28 09:10:56 +01:00
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2019-09-28 10:55:55 +02:00
|
|
|
package com.djrapitops.plan.storage.database.transactions.patches;
|
2017-05-01 10:45:02 +02:00
|
|
|
|
|
|
|
/**
|
2019-09-28 10:55:55 +02:00
|
|
|
* Patch that removes plan_commandusages table.
|
2021-01-01 10:31:40 +01:00
|
|
|
* <p>
|
2024-01-06 16:59:29 +01:00
|
|
|
* See <a href="https://github.com/plan-player-analytics/Plan/issues/1240">related issue</a> for more details
|
2018-03-01 11:01:14 +01:00
|
|
|
*
|
2021-02-13 14:16:03 +01:00
|
|
|
* @author AuroraLS3
|
2017-05-01 10:45:02 +02:00
|
|
|
*/
|
2019-09-28 10:55:55 +02:00
|
|
|
public class CommandUsageTableRemovalPatch extends Patch {
|
2019-01-20 10:22:23 +01:00
|
|
|
|
2019-09-28 10:55:55 +02:00
|
|
|
@Override
|
|
|
|
public boolean hasBeenApplied() {
|
|
|
|
return !hasTable("plan_commandusages");
|
2017-05-01 10:45:02 +02:00
|
|
|
}
|
|
|
|
|
2019-09-28 10:55:55 +02:00
|
|
|
@Override
|
|
|
|
protected void applyPatch() {
|
|
|
|
dropTable("plan_commandusages");
|
|
|
|
}
|
|
|
|
}
|