AutoTable for Openclaw

An automation skill for AutoTable, a JDBC-based Java framework that automatically maintains database table structures without ORM dependencies.

imtzc
v0.1.0
Jun 9, 2026
0
462
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install autotable-usage

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install autotable-usage using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is AutoTable?

The AutoTable skill provides developers with a robust tool to automatically manage, update, and validate database schemas directly from Java entities. Built entirely on JDBC via commons-dbutils, it operates completely independent of any specific ORM framework, allowing seamless coexistence with popular engines like MyBatis, MyBatis-Plus, MyBatis-Flex, and JPA. By automating structural syncs, developers avoid writing manual DDL scripts during rapid development cycles.

Integrating this skill through Openclaw Skills empowers your development team to troubleshoot configuration issues, generate proper entity annotations, and adapt to specific database behaviors. This automation ensures database schemas remain synchronized with your Java codebase across development, testing, and production environments without manual overhead.

AutoTable Use Cases

  • Rapid Prototyping: Automatically generate and modify complex database tables directly from annotated Java entity classes during initial development phases.
  • Multi-Database Portability: Maintain a single codebase that safely maps across 9 different database systems using uniform annotations.
  • Production Schema Validation: Run in validation-only mode in production environments to prevent catastrophic, unauthorized database migrations.
  • Multi-DataSource Configurations: Handle complex multi-tenant or multi-database environments with distinct schema update policies.

How AutoTable Works

  1. Entity Scanning: During application startup, AutoTable scans designated packages for Java classes decorated with the @AutoTable annotation.
  2. Configuration Alignment: It parses system configurations to determine the active RunMode (update, validate, create, or none) and target database engine specifications.
  3. Schema Mapping: Utilizing direct JDBC connections via commons-dbutils, it retrieves the existing database metadata directly.
  4. Delta Comparison: The framework performs a physical-to-logical comparison between your actual database schema and the Java entity configuration rules.
  5. Safe Migration: Based on the evaluation, it safely executes incremental DDL statements to reconcile structures, or throws verification errors depending on environmental settings.

AutoTable Setup

To leverage this skill within your workspace integrated with Openclaw Skills, configure the AutoTable library in your project:

1. Add Maven Dependency

Add the following dependencies depending on your application runtime framework:

<!-- Spring Boot Starter (compatible with 2.x and 3.x) -->
<dependency>
    <groupId>org.dromara.autotable</groupId>
    <artifactId>auto-table-spring-boot-starter</artifactId>
    <version>2.5.17</version>
</dependency>

<!-- Solon Plugin -->
<dependency>
    <groupId>org.dromara.autotable</groupId>
    <artifactId>auto-table-solon-plugin</artifactId>
    <version>2.5.17</version>
</dependency>

2. Enable AutoTable

Annotate your main startup class to activate the configuration layer:

// Spring Boot
@EnableAutoTable
@SpringBootApplication
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}

// Solon
@EnableAutoTable
public class Application {
    public static void main(String[] args) {
        Solon.start(Application.class, args);
    }
}

AutoTable Data Schema & Taxonomy

AutoTable maps Java fields to target database tables using standard, hierarchical annotations and execution modes:

RunMode Options

RunMode Operations Safe for Production?
update Automatically synchronizes incremental schema modifications. No (Dev only)
validate Validates schema compatibility. Aborts startup if a mismatch occurs. Yes
create Drops tables and recreates them, clearing all active records. No (Test only)
none Bypasses all validation and automatic schema processing. Yes

Annotation Scheme

  • Class Level (@AutoTable): Marks the Java entity for table generation.
    • @TableIndex: Declares single or composite indexes.
    • @MysqlEngine / @MysqlCharset: Standardizes engine and character sets in MySQL.
  • Field Level (@AutoColumn): Configures columns, lengths, types, and defaults.
    • @PrimaryKey / @AutoIncrement: Dictates key configurations.
    • @Ignore: Explicitly ignores the field during mapping calculations.

AutoTable Advanced Features

  • 9 Database Dialects Supported: Adapts natively to MySQL, MariaDB, PostgreSQL, Oracle, SQLite, H2, Doris, DM, and KingBase.
  • Cloud MySQL Adjustments: Optional settings to separate DROP and ADD alterations (mysql.alter-table-separate-drop) for cloud databases that prohibit merged operations.
  • Doris Safety Boundaries: Prevents schema mutations on large tables exceeding 1GB automatically using size limitations (doris.update-limit-table-data-length).
  • SPI Extension Engine: Advanced lifecycle callbacks and SPI interfaces allow customization of SQL generation and migration procedures.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*