Opensourcepos: /database/2.3.2_to_2.3.3.sql errors

Created on 18 Aug 2017  路  4Comments  路  Source: opensourcepos/opensourcepos

Issue / Question / Bug

Before submitting an issue please make sure you tick (add an x between the square brackets with no spaces) the following check boxes:

  • [x] I'm reporting an issue of an unmodified OSPOS installation
  • [x] I checked open and closed issues database and no similar issue was already discussed (please make sure you searched!)
  • [x] I read the README, WHATS_NEW and UPGRADE
  • [x] I read the FAQ (https://github.com/jekkos/opensourcepos#faq) for any known install and/or upgrade gotchas (in specific PHP has php-gd, php-intl, sockets and etc. installed)
  • [x] I read the wiki
  • [x] I ran any database upgrade scripts (e.g. database/2.4_to_3.0.sql), and migrating function
  • [x] I'm aware the latest master could be a development version and therefore not stable
  • [x] I know the version of OSPOS and git commit hash (check the footer of your OSPOS), the name and version of OS, Web server, PHP and MySQL and will add them to my issue report

Installation information

  • OSPOS version is: 3.1.0
  • OSPOS git commit hash is:
  • PHP version is: (e.g. 5.5, 5.6, 7.0, 7.1) 5.6.31
  • MySQL or MariaDB version is: (e.g. MySQL 5.5, MySQL 5.6, MySQL 5.7, MariaDB 10.0, MariaDB 10.1, MariaDB 10.2) MySQL 5.7
  • OS and version is: (e.g. CentOS 6.9, Ubuntu 16.4, Windows 10) FreeBSD 11.0
  • WebServer is: (e.g. Apache 2.2, Apache 2.4, Nginx 1.12, Nginx 1.13) Apache 2.4
  • (If applicable) Installation package for the LAMP/LEMP stack is: (e.g. WAMP, XAMPP) FAMP

Expected behaviour

MySQL script completes with no errors.

Actual behaviour

MySQL Error: #1048 - Column 'comment' cannot be null

This is caused by the column being set as "NOT NULL" therefore making it illegal to replace '0' with 'NULL'

I believe prior to lines 16-18 the following code should be added.

ALTER TABLE ospos_sales
MODIFY COLUMN comment text DEFAULT NULL;

ALTER TABLE ospos_receivings
MODIFY COLUMN comment text DEFAULT NULL;

ALTER TABLE ospos_sales_suspended
MODIFY COLUMN comment text DEFAULT NULL;

Steps to reproduce the issue

Run the script on a 2.3.2 database

bug

All 4 comments

There should be a ` symbol surrounding names but github is commenting those out.

@objecttothis In terms of fixing stuff, might be even easier if you edit the code directly in github and send us a pull request, so we have an issue with your subsequent changes so we can correct direcly the codebase.
Quite fast for minor things like this.

Fix in master

@jekkos sure. I'll do that for the future. While I'm not new to ospos or php, I'm someone new to collaboration schemes and github specifically. Thanks for your patience.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SteveIreland picture SteveIreland  路  4Comments

AbanoubMakram picture AbanoubMakram  路  4Comments

asakpke picture asakpke  路  4Comments

objecttothis picture objecttothis  路  4Comments

ozzylamberth picture ozzylamberth  路  4Comments