-- Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--

CREATE SCHEMA TEST;
> ok

CREATE TABLE TEST.TBL (
    NAME VARCHAR
);
> ok

CREATE UNIQUE INDEX NAME_INDEX ON TEST.TBL(NAME);
> ok

-- MySQL compatibility syntax
ALTER TABLE TEST.TBL DROP INDEX NAME_INDEX;
> ok

CREATE UNIQUE INDEX NAME_INDEX ON TEST.TBL(NAME);
> ok

-- MySQL compatibility syntax
ALTER TABLE TEST.TBL DROP INDEX TEST.NAME_INDEX;
> ok

ALTER TABLE TEST.TBL ADD CONSTRAINT NAME_INDEX UNIQUE (NAME);
> ok

-- MySQL compatibility syntax
ALTER TABLE TEST.TBL DROP INDEX NAME_INDEX;
> ok

ALTER TABLE TEST.TBL ADD CONSTRAINT NAME_INDEX UNIQUE (NAME);
> ok

-- MySQL compatibility syntax
ALTER TABLE TEST.TBL DROP INDEX TEST.NAME_INDEX;
> ok

DROP SCHEMA TEST CASCADE;
> ok
