CREATE TABLE dbo.ci_sessions (
	session_id varchar(40) DEFAULT '0' NOT NULL,
	ip_address varchar(16) DEFAULT '0' NOT NULL,
	user_agent varchar(120) NOT NULL,
	last_activity int DEFAULT 0 NOT NULL,
	user_data varchar(max) NOT NULL, -- use varchar(max) instead of MySQL TEXT data type
	PRIMARY KEY (session_id)
)
GO

-- Simalate MySQL 'UNSIGNED' field option
ALTER TABLE dbo.ci_sessions ADD CONSTRAINT last_activity_unsigned
	CHECK (last_activity >= 0)
GO

CREATE INDEX last_activity_idx
ON dbo.ci_sessions (last_activity)
블로그 이미지

디츠

“말은 쉽지, 코드를 보여줘.” “Talk is cheap. Show me the code.” – 리누스 토르발스(Linus Torvalds)

,