Version 1.2.0
Here is complete changelog and update guide.
v1.2.0 (06-Sept-2024)
- SuperAdmin Added
- App Bar is sticky now.
- Bug & Genereal code improvements
Update guide
Step 1: Update DB
1.1: A new table is added which is superadmins
, to add that table, run the following SQL query.
CREATE TABLE `superadmins` (
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`name` varchar(255) DEFAULT NULL,
PRIMARY KEY (`email`)
)
1.2: Insert your credentials to be used as super admin using the insert query. Generate the encrypted password using bcrypt-generator and set the number of rounds to 10. Use this generated password in the insert query.
INSERT INTO `superadmins` VALUES (‘example@gmail.com',’$2a$10$BB0NRi.4lM8WXK.vG8.2y.bBikAD/qjPup8ay8j8WoN/AnYzuuMve’,'example');
1.3: Another table that is added is exchange_rates
, to add that table, run the following SQL query.
CREATE TABLE `exchange_rates` (
`currency_code` varchar(5) NOT NULL,
`rate_to_usd` decimal(10,6) DEFAULT NULL,
PRIMARY KEY (`currency_code`)
)
INSERT INTO `exchange_rates` VALUES ('AED',0.272294),('AFN',0.011605),('ALL',0.009282),('AMD',0.002597),('ANG',0.558778),('AOA',0.001781),('ARS',0.005990),('AUD',0.642500),('BBD',0.499491),('BDT',0.009529),('BGN',0.546679),('BHD',2.659832),('BIF',0.000534),('BMD',1.000000),('BND',0.728092),('BOB',0.144319),('BRL',0.199698),('BSD',1.000000),('BTN',0.012350),('BWP',0.074960),('BYN',0.382052),('BZD',0.499491),('CAD',0.751200),('CDF',0.000478),('CHF',1.130100),('CLP',0.001261),('CNY',0.138800),('COP',0.000254),('CRC',0.001787),('CUP',0.039418),('CVE',0.009850),('CZK',0.044845),('DJF',0.005663),('DKK',0.151189),('DOP',0.017578),('DZD',0.007337),('EGP',0.032837),('ERN',0.066673),('ETB',0.018990),('EUR',1.083500),('FJD',0.455470),('FKP',1.213880),('GBP',1.271600),('GEL',0.378442),('GHS',0.084208),('GMD',0.019555),('GNF',0.000092),('GTQ',0.128165),('GYD',0.004752),('HNL',0.040623),('HRK',0.144318),('HTG',0.009611),('HUF',0.002940),('IDR',0.000065),('ILS',0.277613),('INR',0.012200),('IQD',0.000685),('IRR',0.000023),('ISK',0.007390),('JMD',0.006605),('JPY',0.006745),('KES',0.006915),('KGS',0.011845),('KHR',0.000025),('KID',0.642500),('KMF',0.002263),('KRW',0.000752),('KWD',3.290740),('KYD',1.202783),('KZT',0.002167),('LAK',0.000053),('LBP',0.000660),('LKR',0.003028),('LRD',0.053222),('LSL',0.051787),('LYD',0.217060),('MAD',0.097896),('MDL',0.055085),('MGA',0.000209),('MKD',0.020469),('MMK',0.000473),('MNT',0.000268),('MOP',0.124596),('MRO',0.002820),('MUR',0.022677),('MVR',0.064782),('MWK',0.001282),('MXN',0.055600),('MYR',0.215823),('MZN',0.015904),('NAD',0.051787),('NGN',0.002164),('NIO',0.027879),('NOK',0.093181),('NPR',0.009551),('NZD',0.601468),('OMR',2.600228),('PAB',1.000000),('PEN',0.269066),('PGK',0.284833),('PHP',0.018072),('PKR',0.003489),('PLN',0.260738),('PYG',0.000141),('QAR',0.274604),('RON',0.222891),('RSD',0.009238),('RUB',0.010352),('RWF',0.000912),('SAR',0.266697),('SBD',0.124509),('SCR',0.061233),('SDG',0.002093),('SEK',0.091820),('SGD',0.728092),('SHP',1.213880),('SLL',0.000052),('SOS',0.001761),('SRD',0.050451),('SSP',0.005547),('STN',0.046463),('SYP',0.001880),('SZL',0.051787),('THB',0.028871),('TJS',0.088342),('TMT',0.285969),('TND',0.330593),('TOP',0.437072),('TRY',0.037168),('TTD',0.148161),('TWD',0.031336),('TZS',0.000409),('UAH',0.027422),('UGX',0.000264),('USD',1.000000),('UYU',0.026892),('UZS',0.000094),('VES',0.034453),('VND',0.000042),('VUV',0.008731),('WST',0.384982),('XAF',0.001648),('XAG',22.120000),('XAU',1955.410000),('XCD',0.370129),('XDR',1.411709),('XOF',0.001648),('XPF',0.009390),('YER',0.003947),('ZAR',0.051787),('ZMW',0.037858),('ZWL',0.011788);
1.4: Add a new column “created_at” of the data type timestamp in the existing tenant table and set it’s default value to current_timestamp using the below query.
ALTER TABLE `tenants`
ADD COLUMN `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP;
1.5: Add a new column “status” in the existing subscription_history table which have an enum data type that takes up only the provided values.
ALTER TABLE `subscription_history`
ADD COLUMN `status` ENUM('created', 'cancelled', 'updated') DEFAULT NULL;
1.6: Super Admin URL
https://your-domain.com/superadmin/login
Step 2: Update Backend Code
- Replace the existing backend files with the latest version.
- Follow the same steps as the initial setup of RestroPRO to configure the new features.
Step 3: Update Frontend Code
- Similarly, replace and configure the frontend code, following the standard setup process for RestroPRO.