mirror of
https://github.com/standardebooks/web.git
synced 2025-07-15 19:06:49 -04:00
Add system to retrieve and manage donations in a local database
This commit is contained in:
parent
79c531aacb
commit
70a80d0e02
46 changed files with 782 additions and 910 deletions
10
config/sql/se/Patrons.sql
Normal file
10
config/sql/se/Patrons.sql
Normal file
|
@ -0,0 +1,10 @@
|
|||
CREATE TABLE `Patrons` (
|
||||
`UserId` int(10) unsigned NOT NULL,
|
||||
`IsAnonymous` tinyint(1) unsigned NOT NULL DEFAULT 0,
|
||||
`AlternateName` varchar(80) DEFAULT NULL,
|
||||
`IsSubscribedToEmails` tinyint(1) NOT NULL DEFAULT 1,
|
||||
`Timestamp` datetime NOT NULL,
|
||||
`DeactivatedTimestamp` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`UserId`),
|
||||
KEY `index2` (`IsAnonymous`,`DeactivatedTimestamp`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
12
config/sql/se/Payments.sql
Normal file
12
config/sql/se/Payments.sql
Normal file
|
@ -0,0 +1,12 @@
|
|||
CREATE TABLE `Payments` (
|
||||
`PaymentId` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`UserId` int(10) unsigned DEFAULT NULL,
|
||||
`Timestamp` datetime NOT NULL,
|
||||
`ChannelId` tinyint(4) unsigned NOT NULL,
|
||||
`TransactionId` varchar(80) NOT NULL,
|
||||
`Amount` decimal(7,2) unsigned NOT NULL,
|
||||
`Fee` decimal(7,2) unsigned NOT NULL DEFAULT 0.00,
|
||||
`IsRecurring` tinyint(1) unsigned NOT NULL,
|
||||
PRIMARY KEY (`PaymentId`),
|
||||
KEY `index2` (`UserId`,`Amount`,`Timestamp`,`IsRecurring`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=828 DEFAULT CHARSET=utf8mb4;
|
6
config/sql/se/PendingPayments.sql
Normal file
6
config/sql/se/PendingPayments.sql
Normal file
|
@ -0,0 +1,6 @@
|
|||
CREATE TABLE `PendingPayments` (
|
||||
`Timestamp` datetime NOT NULL,
|
||||
`ChannelId` tinyint(4) unsigned NOT NULL,
|
||||
`TransactionId` varchar(80) NOT NULL,
|
||||
`ProcessedOn` datetime DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
9
config/sql/se/Users.sql
Normal file
9
config/sql/se/Users.sql
Normal file
|
@ -0,0 +1,9 @@
|
|||
CREATE TABLE `Users` (
|
||||
`UserId` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`Email` varchar(80) DEFAULT NULL,
|
||||
`Name` varchar(255) DEFAULT NULL,
|
||||
`Timestamp` datetime NOT NULL,
|
||||
`Uuid` char(36) NOT NULL,
|
||||
PRIMARY KEY (`UserId`),
|
||||
UNIQUE KEY `idxEmail` (`Email`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=281 DEFAULT CHARSET=utf8mb4;
|
9
config/sql/users.sql
Normal file
9
config/sql/users.sql
Normal file
|
@ -0,0 +1,9 @@
|
|||
create user 'alex'@'localhost' identified by unix_socket;
|
||||
create user 'se'@'localhost' identified by unix_socket;
|
||||
create user 'www-data'@'localhost' identified by unix_socket;
|
||||
|
||||
grant * on * to alex@localhost identified via unix_socket;
|
||||
grant select, insert, update, delete, execute on se.* to se@localhost identified via unix_socket;
|
||||
grant select, insert, update, delete, execute on se.* to www-data@localhost identified via unix_socket;
|
||||
|
||||
flush privileges;
|
Loading…
Add table
Add a link
Reference in a new issue