Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

Interfaces 103: Build Complex Interfaces by Adapting Patterns

Certified Senior Developer

I am trying to import SQL file attached in the module to create Personal Finance tables in Cloud Database but I am getting below error:

-- --------------------------------------------------------

--
-- Table structure for table `PF_ACCOUNT`
--

CREATE TABLE `PF_ACCOUNT` (
  `ACCOUNT_ID` int(11) NOT NULL,
  `TYPE_ID` int(11) DEFAULT NULL,
  `BALANCE` double DEFAULT NULL,
  `NAME` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

MySQL said: 

#1173 - This table type requires a primary key

Can anyone help me here.

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer

    CREATE TABLE `PF_ACCOUNT` (
      `ACCOUNT_ID` int(11) NOT NULL AUTO_INCREMENT, 
      `TYPE_ID` int(11) DEFAULT NULL,
      `BALANCE` double DEFAULT NULL,
      `NAME` varchar(255) DEFAULT NULL,
      PRIMARY KEY (`ACCOUNT_ID`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;


     You can't create table without primary key. 
    I assumed that 'ACCOUNT_ID' will be a primary key.
    A primary key is a crucial element in a relational database table, and MySQL requires it for InnoDB tables (the engine you're using).

Reply
  • +1
    Certified Lead Developer

    CREATE TABLE `PF_ACCOUNT` (
      `ACCOUNT_ID` int(11) NOT NULL AUTO_INCREMENT, 
      `TYPE_ID` int(11) DEFAULT NULL,
      `BALANCE` double DEFAULT NULL,
      `NAME` varchar(255) DEFAULT NULL,
      PRIMARY KEY (`ACCOUNT_ID`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;


     You can't create table without primary key. 
    I assumed that 'ACCOUNT_ID' will be a primary key.
    A primary key is a crucial element in a relational database table, and MySQL requires it for InnoDB tables (the engine you're using).

Children