Skip to content

Latest commit

 

History

History
84 lines (63 loc) · 2.55 KB

README.md

File metadata and controls

84 lines (63 loc) · 2.55 KB

For best results, it's HIGHLY recommended to use the Trongate Desktop App, which is available at https://trongate.io.

If - for some reason - you'd like to use the Trongate framework without the desktop app AND you'd like to use the API manager then you'll need to set up a mySQL database. Here's a dump of some SQL code that will get you started with API authentication:

START

-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/

-- Host: localhost -- Generation Time: Aug 13, 2019 at 08:25 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.0.28

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION;

CREATE TABLE IF NOT EXISTS comments ( id int(11) NOT NULL AUTO_INCREMENT, comment text NOT NULL, date_created int(11) NOT NULL DEFAULT '0', user_id int(11) NOT NULL, target_table varchar(125) NOT NULL, update_id int(11) NOT NULL, code varchar(6) NOT NULL DEFAULT '', PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS trongate_tokens ( id int(11) NOT NULL AUTO_INCREMENT, token varchar(125) NOT NULL, user_id int(11) NOT NULL DEFAULT '0', expiry_date int(11) NOT NULL, code varchar(3) NOT NULL DEFAULT '0', PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS trongate_users ( id int(11) NOT NULL AUTO_INCREMENT, code varchar(32) DEFAULT NULL, user_level_id int(11) NOT NULL DEFAULT '0', PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

INSERT INTO trongate_users (id, code, user_level_id) VALUES (1, 'UVsY8ASG5evncc4U6trru2XH5Tbq7MU5', 1);

CREATE TABLE IF NOT EXISTS trongate_user_levels ( id int(11) NOT NULL AUTO_INCREMENT, level_title varchar(125) NOT NULL DEFAULT '', PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

INSERT INTO trongate_user_levels (id, level_title) VALUES (1, 'admin');

CREATE TABLE IF NOT EXISTS trongate_administrators ( id int(11) NOT NULL, username varchar(65) NOT NULL, password varchar(60) NOT NULL, trongate_user_id int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO trongate_administrators (id, username, password, trongate_user_id) VALUES (11, 'admin', '$2y$11$SoHZDvbfLSRHAi3WiKIBiu.tAoi/GCBBO4HRxVX1I3qQkq3wCWfXi', 1);

ALTER TABLE trongate_administrators ADD PRIMARY KEY (id);

ALTER TABLE trongate_administrators MODIFY id int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; COMMIT;

COMMIT;

END