"""
Skills 表迁移脚本

执行方式: python migrations/add_skills_table.py
"""
import os
import sys

# 添加项目根目录到路径
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

from app import create_app, db
from models import Skill


def create_skills_table():
    """创建 skills 表"""
    app = create_app('development')

    with app.app_context():
        db.create_all()
        print('skills 表创建成功')


if __name__ == '__main__':
    create_skills_table()