You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/10/20 14:14:17 UTC

[GitHub] [airflow] rotemseekingalpha commented on issue #27163: Fail to view grid for new DAGs

rotemseekingalpha commented on issue #27163:
URL: https://github.com/apache/airflow/issues/27163#issuecomment-1285623301

   As I understand it, the tables unique constraints should be created with default as the corresponding sequence's next value.
   ```
   airflow=> DROP TABLE IF EXISTS t CASCADE;
   DROP TABLE
   airflow=> CREATE TABLE t(id INT NOT NULL PRIMARY KEY, name VARCHAR(10));
   CREATE TABLE
   airflow=> DROP SEQUENCE IF EXISTS t_id_seq;
   DROP SEQUENCE
   airflow=> CREATE SEQUENCE t_id_seq START WITH 1;
   CREATE SEQUENCE
   airflow=> ALTER TABLE t ALTER COLUMN id DROP DEFAULT;
   ALTER TABLE
   airflow=> ALTER TABLE t ALTER COLUMN id SET DEFAULT NEXTVAL('t_id_seq');
   ALTER TABLE
   airflow=> INSERT INTO t (name) VALUES ('aaa');
   INSERT 0 1
   airflow=> SELECT * FROM t;
    id | name 
   ----+------
     1 | aaa
   (1 row)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org