Advertisement:

Author Topic: [2.0.13] smf_db_create_table no $column_info  (Read 3043 times)

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,645
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
[2.0.13] smf_db_create_table no $column_info
« on: February 03, 2017, 12:02:40 AM »
function smf_db_create_table($table_name, $columns, $indexes = array(), $parameters = array(), $if_exists = 'ignore', $error = 'fatal')

This line changed to
Code: [Select]
$unsigned = in_array($type, array('int', 'tinyint', 'smallint', 'mediumint', 'bigint')) && !empty($column['unsigned']) ? 'unsigned ' : '';
To
Code: [Select]
$unsigned = in_array($type, array('int', 'tinyint', 'smallint', 'mediumint', 'bigint', 'float')) && !empty($column_info['unsigned']) ? 'unsigned ' : '';
Issue there is no $column_info

It was done in some other spots but it makes sense in those spots
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline live627

  • Developer
  • SMF Hero
  • *
  • Posts: 5,729
  • Gender: Male
    • live627 on Facebook
    • live627 on GitHub
    • live627 on LinkedIn
    • @live627 on Twitter
    • livemods
Re: [2.0.13] smf_db_create_table no $column_info
« Reply #1 on: February 03, 2017, 06:50:42 PM »
Can you check if this issue is also in 2.1? I'm not in a coding mood right now... (burnout yet again)

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,645
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: [2.0.13] smf_db_create_table no $column_info
« Reply #2 on: February 03, 2017, 06:56:17 PM »
Does not affect 2.1
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 616
Re: [2.0.13] smf_db_create_table no $column_info
« Reply #3 on: February 04, 2017, 04:02:28 AM »
I would like to comment this part in general:

In my eyes you should forget that unsigned exists,
from sql standard pov is garbage.

And i know "mysql can it" and "smf use it" but both is wrong.

the api of smf is designed to work with all supported databases.
In smf 2.1 is it mysql and pg,
and you run in trouble when the min and max value in both database is different.