Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: Found ALTER statement to not existed TABLE COMTCCMMNCODE with SCHEMA None #147

Open
ivbeg opened this issue Jul 1, 2022 · 1 comment
Assignees

Comments

@ivbeg
Copy link

ivbeg commented Jul 1, 2022

Describe the bug
ValueError 'Found ALTER statement to not existed TABLE COMTCCMMNCODE with SCHEMA None' on certain files

To Reproduce
Steps to reproduce the behavior:

  1. Take file https://github.com/LeeBaekHaeng/GodTest2016/blob/a080fc963eaaf372ec5fab132b954849090a3225/god.test20170818/src/script/tibero/ddl/sts.cst_create_tibero.sql?raw=True
  2. Use code ddl = parse_from_file(filepath)
  3. See error ValueError: Found ALTER statement to not existed TABLE COMTCCMMNCODE with SCHEMA None

That's an especially strange error since no ALTER statement exists in this file.

Expected behavior
DDLParserError with a clear error explanation

More examples

@xnuinside
Copy link
Owner

Note for me: Need to add support for case

CREATE TABLE COMTCCMMNCODE
(
	CODE_ID               VARCHAR2(6)  NOT NULL ,
	CODE_ID_NM            VARCHAR2(60)  NULL ,
	CODE_ID_DC            VARCHAR2(200)  NULL ,
	USE_AT                CHAR(1)  NULL ,
	CL_CODE               CHAR(3)  NULL ,
	FRST_REGIST_PNTTM     DATE  NULL ,
	FRST_REGISTER_ID      VARCHAR2(20)  NULL ,
	LAST_UPDT_PNTTM       DATE  NULL ,
	LAST_UPDUSR_ID        VARCHAR2(20)  NULL ,
CONSTRAINT  COMTCCMMNCODE_PK PRIMARY KEY (CODE_ID),
CONSTRAINT  COMTCCMMNCODE_FK1 FOREIGN KEY (CL_CODE) REFERENCES COMTCCMMNCLCODE(CL_CODE) ON DELETE SET NULL
);

@xnuinside xnuinside self-assigned this May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants