oschina_recommendation/database/user_relations_index.sql

45 lines
1.4 KiB
SQL

/*
Navicat Premium Data Transfer
Source Server : postgresql_localhost
Source Server Type : PostgreSQL
Source Server Version : 100007
Source Host : localhost:5432
Source Catalog : oschina
Source Schema : iTags
Target Server Type : PostgreSQL
Target Server Version : 100007
File Encoding : 65001
Date: 13/03/2019 10:53:13
*/
-- ----------------------------
-- Table structure for user_relations
-- ----------------------------
create sequence user_relations_id_seq;
DROP TABLE IF EXISTS "iTags"."user_relations";
CREATE TABLE "iTags"."user_relations" (
"id" int8 NOT NULL DEFAULT nextval('"iTags".user_relations_id_seq'::regclass),
"uid" int8 NOT NULL DEFAULT NULL,
"uid2" int8 NOT NULL DEFAULT NULL,
"relation" float8 NOT NULL DEFAULT NULL
)
;
-- ----------------------------
-- Indexes structure for table user_relations
-- ----------------------------
CREATE INDEX "uid_uid2" ON "iTags"."user_relations" USING btree (
"uid" "pg_catalog"."int8_ops" ASC NULLS LAST,
"uid2" "pg_catalog"."int8_ops" ASC NULLS LAST
);
-- ----------------------------
-- Primary Key structure for table user_relations
-- ----------------------------
ALTER TABLE "iTags"."user_relations" ADD CONSTRAINT "posted_articles_copy1_pkey" PRIMARY KEY ("id");
alter sequence user_relations_id_seq owned by "iTags"."user_relations"."id";