Error when adding user

Some have recommended removing the column that is causing this. However, it could cause issues with later db migrations if the SambaPOS dev team tries to remove a column that doesn’t exist.

What I recommend is changing the column to allow nulls. So give this a try. If it doesn’t work we can try setting a default constraint instead.

SQL if you want to modify directly in SSMS:

BEGIN TRANSACTION;
BEGIN TRY

  ALTER TABLE dbo.Users ALTER COLUMN SevenShiftsEmployeeId INT NULL;

  COMMIT TRANSACTION;
END TRY
BEGIN CATCH
  IF @@TRANCOUNT > 0
    BEGIN
      ROLLBACK TRANSACTION;
    END;
END CATCH;

Database tool file if you want to execute it within SambaPOS management:
[CBL]Alter_Users_Table_Null_SevenShiftsId.zip (375 Bytes)

4 Likes