Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Codio-API-Template/install.sql
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
14 lines (12 sloc)
418 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- onetime setup for the api database | |
CREATE USER IF NOT EXISTS apiuser IDENTIFIED BY 'CHANGEME'; | |
DROP DATABASE IF EXISTS api; | |
CREATE DATABASE IF NOT EXISTS api; | |
USE api; | |
GRANT INSERT, SELECT, UPDATE, DELETE ON api.* TO apiuser; | |
CREATE TABLE IF NOT EXISTS accounts ( | |
id SMALLINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, | |
username VARCHAR(25) NOT NULL, | |
password VARCHAR(60) NOT NULL, | |
email VARCHAR(25) NOT NULL | |
); |