VidYen / VidYen-WordPress-Plugins

VidYen Plugins for WordPress
GNU General Public License v2.0
9 stars 2 forks source link

point_amount now is double(64, 16) #40

Closed VidYen closed 6 years ago

VidYen commented 6 years ago

I broke down and added decimal places now that I have successfully number_format()'ed most places where you see numbers.

It required a database update on my site of things, but...

I WILL NEED TO TEST ON A FRESH INSTALL

Which I should do anyways to make sure I did not break anything...

As far as I know... No one has actually installed VYPS on a server other than my own so no need to code in a database upgrade, but will have to do that eventually.

I will close this after I finish testing.

(Feel like I haven't done anything today but have)

I could have run float, but we aren't developing programs for financial institutions or at least they shouldn't be using wordpress.

VidYen commented 6 years ago

on vyps.php

$sql .= "CREATE TABLE {$table_name} ( id mediumint(9) NOT NULL AUTO_INCREMENT, reason tinytext NOT NULL, user_id mediumint(9) NOT NULL, time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, points varchar(11) NOT NULL, points_amount double(64, 16) NOT NULL, adjustment varchar(100) NOT NULL, PRIMARY KEY (id) ) {$charset_collate};";

VidYen commented 6 years ago

Reverted. Now back to 64,0