Initialize:
docker compose up --build -d
Builds and starts the containers in detached mode.
Start:
docker compose up -d
Starts the containers in detached mode.
Stop:
docker compose down -v
Stops and removes the containers.
Reset:
docker compose down -v; docker compose up --build -d
Stops and removes the containers, then rebuilds and starts them.
Seeding & Migration (Initializing Database):
docker compose run --rm flyway migrate
Executes migrations to update the database schema.
Baseline:
docker compose run --rm flyway baseline -v 1 -d "Initial baseline"
Creates a baseline version of the database schema.
Clean:
docker compose run --rm flyway clean
Drops all objects from the database.
Info:
docker compose run --rm flyway info
Shows the status of all migrations.
Validate:
docker compose run --rm flyway validate
Validates the applied migrations against the available ones.
Undo (Teams Edition):
docker compose run --rm flyway undo
Undoes the last applied migration. (Available in Flyway Teams Edition)
Repair:
docker compose run --rm flyway repair
Repairs the metadata table.
Generate:
docker compose run --rm flyway generate
Generates new migration scripts.
> create mysql instance
> create s3 storage instance
> migrate flyway to mysql aws
> deploy backend
> deploy backend
// interfaces.ts
export interface Filter {
field: string;
operator: string;
value: any;
}
export interface Pagination {
limit: number;
page: number;
sortBy?: string;
sortOrder?: string;
total?: number;
totalPages?: number;
prevPage?: number;
nextPage?: number;
}
export interface ListRequest {
filters: Filter[];
pagination: Pagination;
}
export interface ListResponse<T> {
data: T[];
pagination: Pagination;
}
// api.ts
import axios from 'axios';
import { ListRequest, ListResponse } from './interfaces';
export async function listEntities<T>(endpoint: string, request: ListRequest): Promise<ListResponse<T>> {
const response = await axios.post<ListResponse<T>>(endpoint, request);
return response.data;
}
// UserList.vue (similar to the previous example)
import { listEntities } from './api';
import { User, Pagination, Filter } from './interfaces';
const fetchUsers = async () => {
// Build filters and request
const request = {
filters: filters.value,
pagination: pagination.value,
};
const response = await listEntities<User>('/users', request);
users.value = response.data;
pagination.value = response.pagination;
};