diff options
Diffstat (limited to 'db')
| -rw-r--r-- | db/models/payments.js | 8 | ||||
| -rw-r--r-- | db/schema.sql | 20 |
2 files changed, 14 insertions, 14 deletions
diff --git a/db/models/payments.js b/db/models/payments.js index 076a644f..51ef2550 100644 --- a/db/models/payments.js +++ b/db/models/payments.js @@ -120,8 +120,8 @@ const attributes = { }, fee: { type: DataTypes.DOUBLE, - allowNull: true, - defaultValue: null, + allowNull: false, + defaultValue: 0, primaryKey: false, autoIncrement: false, comment: null, @@ -129,8 +129,8 @@ const attributes = { }, tip: { type: DataTypes.DOUBLE, - allowNull: true, - defaultValue: null, + allowNull: false, + defaultValue: 0, primaryKey: false, autoIncrement: false, comment: null, diff --git a/db/schema.sql b/db/schema.sql index 28f1bf4d..7ae73327 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -1,8 +1,8 @@ --- MySQL dump 10.17 Distrib 10.3.22-MariaDB, for debian-linux-gnu (x86_64) +-- MySQL dump 10.17 Distrib 10.3.23-MariaDB, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: coinos -- ------------------------------------------------------ --- Server version 10.3.22-MariaDB-1:10.3.22+maria~bionic +-- Server version 10.3.23-MariaDB-1:10.3.23+maria~bionic /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -57,7 +57,7 @@ CREATE TABLE `accounts` ( `ticker` varchar(255) DEFAULT NULL, `precision` int(11) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=3616 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=3715 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -81,7 +81,7 @@ CREATE TABLE `invoices` ( `tip` double DEFAULT NULL, `network` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=4261 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=4433 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -98,18 +98,18 @@ CREATE TABLE `payments` ( `createdAt` datetime NOT NULL, `updatedAt` datetime NOT NULL, `rate` double DEFAULT NULL, - `currency` varchar(255) NOT NULL, + `currency` varchar(255) DEFAULT NULL, `address` varchar(255) DEFAULT NULL, `received` tinyint(1) DEFAULT NULL, `amount` double DEFAULT NULL, - `tip` double DEFAULT NULL, + `tip` double NOT NULL DEFAULT 0, `confirmed` tinyint(1) NOT NULL, - `fee` double DEFAULT NULL, + `fee` double NOT NULL DEFAULT 0, `network` varchar(255) DEFAULT NULL, `account_id` int(11) DEFAULT NULL, `preimage` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=3802 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=4209 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -139,7 +139,7 @@ CREATE TABLE `users` ( `ip` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`id`), KEY `ip` (`ip`) -) ENGINE=InnoDB AUTO_INCREMENT=568 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=619 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -151,4 +151,4 @@ CREATE TABLE `users` ( /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2020-05-06 10:37:13 +-- Dump completed on 2020-06-08 13:03:28 |
