From 059f5db27fe46f401cdc25fa57af104ceb24e173 Mon Sep 17 00:00:00 2001 From: edward Date: Tue, 9 Jan 2018 15:32:47 +0800 Subject: [PATCH] sql/core_ip_access.sql --- sql/core_ip_access.sql | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/sql/core_ip_access.sql b/sql/core_ip_access.sql index 0429c019..57dd1222 100644 --- a/sql/core_ip_access.sql +++ b/sql/core_ip_access.sql @@ -1,10 +1,17 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -/** - * Author: edward - * Created: Jan 9, 2018 - */ +CREATE TABLE core_ip_access ( + id int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (id) +); + +ALTER TABLE core_ip_access ADD COLUMN ip VARCHAR(32) NOT NULL DEFAULT ''; + + + +ALTER TABLE core_locking ADD COLUMN on_id int(11) NOT NULL DEFAULT 0; +ALTER TABLE core_locking ADD COLUMN person_id int(11) NOT NULL DEFAULT 0; +ALTER TABLE core_locking ADD COLUMN created datetime ; + +alter table core_locking ADD INDEX lookup(on_table, on_id, person_id, created); +-- oops... - wrong name of pid. +alter table core_locking change column `int` id int(11) auto_increment not null; \ No newline at end of file -- 2.39.2