Skip to content

problem migration #13 #240

Open
Open

Description

@Weapon8

08:08:28 [EROR] (plugin:CS2-SimpleAdmin (RELEASE)) Error applying migration "013_AddNameColumnToSaPlayerIpsTable".
code = Error (1), message = System.Data.SQLite.SQLiteException (0x87AF001F): SQL logic error
near "TRUNCATE": syntax error
at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, SQLiteCommand command, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
at System.Data.SQLite.SQLiteCommand.BuildNextCommand()
at System.Data.SQLite.SQLiteDataReader.NextResult()
at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteNonQueryAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location ---
at CS2_SimpleAdmin.Database.Migration.ExecuteMigrationsAsync()
at CS2_SimpleAdmin.Database.Migration.ExecuteMigrationsAsync()

I don't understand why it's not working. I even tried to modify the table manually.
Still the same error. :-(

Activity

  1. Weapon8 commented on Oct 26, 2025

    @Weapon8
    Author

    CS2-SimpleAdmin/Database/Migrations/Sqlite/013_AddNameColumnToSaPlayerIpsTable.sql

    TRUNCATE TABLE sa_players_ips;

    ALTER TABLE sa_players_ips ADD name VARCHAR(64) NULL DEFAULT NULL;
    CREATE INDEX IF NOT EXISTS idx_sa_players_ips_used_at ON sa_players_ips (used_at DESC);

    TRUNCATE TABLE no exist on sqlite DELETE FROM it's real script it's possible you change it pls?

  2. NJOOSHY commented on Mar 26, 2026

    @NJOOSHY

    yeah i have encountered this as creating sa_bans , did you solve it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions