Explorar o código

pali_text migration

visuddhinanda %!s(int64=4) %!d(string=hai) anos
pai
achega
ce922eba49

+ 3 - 0
db/postgresql/migrations/2021-11-20-084946_pali_text/down.sql

@@ -0,0 +1,3 @@
+-- This file should undo anything in `up.sql`
+DROP INDEX IF EXISTS pali_text_vri ;
+DROP TABLE pali_text ;

+ 24 - 0
db/postgresql/migrations/2021-11-20-084946_pali_text/up.sql

@@ -0,0 +1,24 @@
+-- Your SQL goes here
+
+CREATE TABLE pali_text 
+(
+	id SERIAL PRIMARY KEY,
+	book INTEGER, 
+	paragraph INTEGER, 
+	level INTEGER, 
+	class varchar (255), 
+	toc TEXT, 
+	text TEXT, 
+	html TEXT, 
+	lenght INTEGER, 
+	album_index INTEGER, 
+	chapter_len INTEGER, 
+	next_chapter INTEGER, 
+	prev_chapter INTEGER, 
+	parent INTEGER, 
+	chapter_strlen INTEGER,
+    created_at  TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
+);
+
+-- 索引
+CREATE INDEX pali_text_vri ON pali_text (book, paragraph );