You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tried the first sample.
First run correctly created a table.
After changing title: string; and text: string; to @column("text") typeorm failed to recreate its own indexes:
executing query: SELECT * FROM information_schema.tables WHERE table_catalog = 'test' AND table_schema = 'public'
executing query: SELECT * FROM information_schema.columns WHERE table_catalog = 'test' AND table_schema = 'public'
executing query: SELECT t.relname AS table_name, i.relname AS index_name, a.attname AS column_name FROM pg_class t, pg_class i, pg_index ix, pg_attribute a
WHERE t.oid = ix.indrelid AND i.oid = ix.indexrelid AND a.attrelid = t.oid
AND a.attnum = ANY(ix.indkey) AND t.relkind = 'r' AND t.relname IN ('type_test_post') ORDER BY t.relname, i.relname
executing query: SELECT table_name, constraint_name FROM information_schema.table_constraints WHERE table_catalog = 'test' AND constraint_type = 'FOREIGN KEY'
executing query: SELECT * FROM information_schema.table_constraints WHERE table_catalog = 'test' AND constraint_type = 'UNIQUE'
executing query: SELECT c.column_name, tc.table_name, tc.constraint_name FROM information_schema.table_constraints tc
JOIN information_schema.constraint_column_usage AS ccu USING (constraint_schema, constraint_name)
JOIN information_schema.columns AS c ON c.table_schema = tc.constraint_schema AND tc.table_name = c.table_name AND ccu.column_name = c.column_name
where constraint_type = 'PRIMARY KEY' and tc.table_catalog = 'test'
executing query: START TRANSACTION
columns changed in type_test_post. updating: title, text
dropping related indices of type_test_post#title: ind_d8ff91f7221b6df7c5b684ffa9cf3239b9baf4ed, my_index_with_id_and_title
executing query: ALTER TABLE "type_test_post" DROP CONSTRAINT "ind_d8ff91f7221b6df7c5b684ffa9cf3239b9baf4ed"
executing query: ALTER TABLE "type_test_post" DROP CONSTRAINT "my_index_with_id_and_title"
query failed: ALTER TABLE "type_test_post" DROP CONSTRAINT "ind_d8ff91f7221b6df7c5b684ffa9cf3239b9baf4ed"
query failed: ALTER TABLE "type_test_post" DROP CONSTRAINT "my_index_with_id_and_title"
executing query: ROLLBACK
Cannot connect: { error: constraint "ind_d8ff91f7221b6df7c5b684ffa9cf3239b9baf4ed" of relation "type_test_post" does not exist
Correct way to drop indexes in postgres is DROP INDEX "ind_d8ff91f7221b6df7c5b684ffa9cf3239b9baf4ed"
NOT ALTER TABLE "type_test_post" DROP CONSTRAINT "ind_d8ff91f7221b6df7c5b684ffa9cf3239b9baf4ed"
The text was updated successfully, but these errors were encountered:
Tried the first sample.
First run correctly created a table.
After changing title: string; and text: string; to @column("text") typeorm failed to recreate its own indexes:
Correct way to drop indexes in postgres is
DROP INDEX "ind_d8ff91f7221b6df7c5b684ffa9cf3239b9baf4ed"
NOT
ALTER TABLE "type_test_post" DROP CONSTRAINT "ind_d8ff91f7221b6df7c5b684ffa9cf3239b9baf4ed"
The text was updated successfully, but these errors were encountered: